[Hardy,CVE-2010-4080,CVE-2010-4081,1/1] ALSA: sound/pci/rme9652: prevent reading uninitialized stack memory, CVE-2010-4080, CVE-2010-4081

Submitted by Brad Figg on Feb. 4, 2011, 5:26 p.m.


Message ID 1296840381-28721-3-git-send-email-brad.figg@canonical.com
State Accepted
Commit 773930c117e9439700e553bca5ef683ad290713f
Headers show

Commit Message

Brad Figg Feb. 4, 2011, 5:26 p.m.
From: Dan Rosenberg <drosenberg@vsecurity.com>


BugLink: http://bugs.launchpad.net/bugs/712723
BugLink: http://bugs.launchpad.net/bugs/712737

SNDRV_HDSP_IOCTL_GET_CONFIG_INFO ioctls in hdspm.c and hdsp.c allow
unprivileged users to read uninitialized kernel stack memory, because
several fields of the hdsp{m}_config_info structs declared on the stack
are not altered or zeroed before being copied back to the user.  This
patch takes care of it.

Signed-off-by: Dan Rosenberg <dan.j.rosenberg@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

(cherry-picked from commit e68d3b316ab7b02a074edc4f770e6a746390cb7d)
Signed-off-by: Brad Figg <brad.figg@canonical.com>
 sound/pci/rme9652/hdsp.c  |    1 +
 sound/pci/rme9652/hdspm.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index ff26a36..210bdd8 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -4548,6 +4548,7 @@  static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne
 			snd_printk(KERN_ERR "Hammerfall-DSP: Firmware needs to be uploaded to the card.\n");	
 			return -EINVAL;
+		memset(&info, 0, sizeof(info));
 		spin_lock_irqsave(&hdsp->lock, flags);
 		info.pref_sync_ref = (unsigned char)hdsp_pref_sync_ref(hdsp);
 		info.wordclock_sync_check = (unsigned char)hdsp_wc_sync_check(hdsp);
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index f1bdda6..a905563 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -4133,6 +4133,7 @@  static int snd_hdspm_hwdep_ioctl(struct snd_hwdep * hw, struct file *file,
+		memset(&info, 0, sizeof(info));
 		info.pref_sync_ref = hdspm_pref_sync_ref(hdspm);
 		info.wordclock_sync_check = hdspm_wc_sync_check(hdspm);