diff options
author | Dan Rosenberg <drosenberg@vsecurity.com> | 2010-09-25 11:07:27 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-25 17:46:22 +0200 |
commit | e68d3b316ab7b02a074edc4f770e6a746390cb7d (patch) | |
tree | 6dddc80b93622ba0bfe626ae1f0b0fddd9395072 /sound/pci/rme9652/hdsp.c | |
parent | 0873a5ae747847ee55a63db409dff3476e45bcd9 (diff) | |
download | lwn-e68d3b316ab7b02a074edc4f770e6a746390cb7d.tar.gz lwn-e68d3b316ab7b02a074edc4f770e6a746390cb7d.zip |
ALSA: sound/pci/rme9652: prevent reading uninitialized stack memory
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@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/rme9652/hdsp.c')
-rw-r--r-- | sound/pci/rme9652/hdsp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index b92adef8e81e..d6fa7bfd9aa1 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c @@ -4609,6 +4609,7 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne if (err < 0) return err; + 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); |