aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAdrian Knoth <adi@drcomp.erfurt.thur.de>2011-02-23 05:43:14 -0500
committerTakashi Iwai <tiwai@suse.de>2011-02-23 09:46:29 -0500
commit4ab69a2b3b84415085d261bcf848b7a95c010c9d (patch)
treefb590d9c1a9158c686dd4eee1c7a728c4734f30b /sound
parent7c4a95b5ec484244fc615be7b9f56c267c51ade6 (diff)
ALSA: hdspm - prevent reading unitialized stack memory
Original patch by Dan Rosenberg <drosenberg@vsecurity.com> under commit e68d3b316ab7b02a074edc4f770e6a746390cb7d. I'm copying his text here: The SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO ioctl in hdspm.c allow unprivileged users to read uninitialized kernel stack memory, because several fields of the hdspm_config struct 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: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/rme9652/hdspm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index 0b0293fb8f0..ced1406d777 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -6081,6 +6081,7 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file,
6081 6081
6082 case SNDRV_HDSPM_IOCTL_GET_CONFIG: 6082 case SNDRV_HDSPM_IOCTL_GET_CONFIG:
6083 6083
6084 memset(&info, 0, sizeof(info));
6084 spin_lock_irq(&hdspm->lock); 6085 spin_lock_irq(&hdspm->lock);
6085 info.pref_sync_ref = hdspm_pref_sync_ref(hdspm); 6086 info.pref_sync_ref = hdspm_pref_sync_ref(hdspm);
6086 info.wordclock_sync_check = hdspm_wc_sync_check(hdspm); 6087 info.wordclock_sync_check = hdspm_wc_sync_check(hdspm);