[Dapper] [CVE-2010-4080] [CVE-2010-4081] [PATCH 1/1] ALSA: sound/pci/rme9652: prevent reading uninitialized stack memory, CVE-2010-4080, CVE-2010-4081
Brad Figg
brad.figg at canonical.com
Fri Feb 4 17:26:19 UTC 2011
From: Dan Rosenberg <drosenberg at vsecurity.com>
CVE-2010-4080
CVE-2010-4081
BugLink: http://bugs.launchpad.net/bugs/712723
BugLink: http://bugs.launchpad.net/bugs/712737
The SNDRV_HDSP_IOCTL_GET_CONFIG_INFO and
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 at gmail.com>
Cc: <stable at kernel.org>
Signed-off-by: Takashi Iwai <tiwai at suse.de>
(backported from commit e68d3b316ab7b02a074edc4f770e6a746390cb7d)
Signed-off-by: Brad Figg <brad.figg at canonical.com>
---
sound/pci/rme9652/hdsp.c | 1 +
sound/pci/rme9652/hdspm.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index d15ffb3..a8c1ccc 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -4463,6 +4463,7 @@ static int snd_hdsp_hwdep_ioctl(snd_hwdep_t *hw, struct file *file, unsigned int
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 4846e98..2e61b87 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -3217,6 +3217,7 @@ static int snd_hdspm_hwdep_ioctl(snd_hwdep_t * hw, struct file *file,
case SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO:
+ memset(&info, 0, sizeof(info));
spin_lock_irq(&hdspm->lock);
info.pref_sync_ref =
(unsigned char) hdspm_pref_sync_ref(hdspm);
--
1.7.3.5
More information about the kernel-team
mailing list