]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ALSA: prevent heap corruption in snd_ctl_new()
authorDan Rosenberg <drosenberg@vsecurity.com>
Tue, 28 Sep 2010 18:18:20 +0000 (14:18 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:08:06 +0000 (18:08 -0500)
commitbe6ccb1263467bc1ff2f56de2d5db5288cc9c36d
tree67831df4d8485fd615da1233bd6d0b589ad12847
parentb9c721f1960327f6f85fa0ca91c3a7e01f9ab881
ALSA: prevent heap corruption in snd_ctl_new()

commit 5591bf07225523600450edd9e6ad258bb877b779 upstream.

The snd_ctl_new() function in sound/core/control.c allocates space for a
snd_kcontrol struct by performing arithmetic operations on a
user-provided size without checking for integer overflow.  If a user
provides a large enough size, an overflow will occur, the allocated
chunk will be too small, and a second user-influenced value will be
written repeatedly past the bounds of this chunk.  This code is
reachable by unprivileged users who have permission to open
a /dev/snd/controlC* device (on many distros, this is group "audio") via
the SNDRV_CTL_IOCTL_ELEM_ADD and SNDRV_CTL_IOCTL_ELEM_REPLACE ioctls.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
sound/core/control.c