kernel_optimize_test/sound/pci
Bo Chen a3aa60d511 ALSA: hda - Handle kzalloc() failure in snd_hda_attach_pcm_stream()
When 'kzalloc()' fails in 'snd_hda_attach_pcm_stream()', a new pcm instance is
created without setting its operators via 'snd_pcm_set_ops()'. Following
operations on the new pcm instance can trigger kernel null pointer dereferences
and cause kernel oops.

This bug was found with my work on building a gray-box fault-injection tool for
linux-kernel-module binaries. A kernel null pointer dereference was confirmed
from line 'substream->ops->open()' in function 'snd_pcm_open_substream()' in
file 'sound/core/pcm_native.c'.

This patch fixes the bug by calling 'snd_device_free()' in the error handling
path of 'kzalloc()', which removes the new pcm instance from the snd card before
returns with an error code.

Signed-off-by: Bo Chen <chenbo@pdx.edu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-01 09:38:54 +02:00
..
ac97 sound: Use octal not symbolic permissions 2018-05-28 11:27:20 +02:00
ali5451
asihpi sound: Use octal not symbolic permissions 2018-05-28 11:27:20 +02:00
au88x0
aw2
ca0106 sound: Use octal not symbolic permissions 2018-05-28 11:27:20 +02:00
cs46xx sound: Use octal not symbolic permissions 2018-05-28 11:27:20 +02:00
cs5535audio
ctxfi sound: Use octal not symbolic permissions 2018-05-28 11:27:20 +02:00
echoaudio ALSA: echoaudio: Drop superfluous macro 2018-05-24 11:23:02 +02:00
emu10k1 sound: Use octal not symbolic permissions 2018-05-28 11:27:20 +02:00
hda ALSA: hda - Handle kzalloc() failure in snd_hda_attach_pcm_stream() 2018-06-01 09:38:54 +02:00
ice1712 sound: Use octal not symbolic permissions 2018-05-28 11:27:20 +02:00
korg1212
lola sound: Use octal not symbolic permissions 2018-05-28 11:27:20 +02:00
lx6464es
mixart
nm256
oxygen ALSA: oxygen: use match_string() helper 2018-05-31 19:42:48 +02:00
pcxhr sound: Use octal not symbolic permissions 2018-05-28 11:27:20 +02:00
riptide
rme9652 ALSA: rme9652: Hardening for potential Spectre v1 2018-04-25 10:37:48 +02:00
trident
vx222
ymfpci
ad1889.c ALSA: ad1889: Replace mdelay with usleep_range in snd_ad1889_ac97_ready 2018-04-16 13:49:09 +02:00
ad1889.h
ak4531_codec.c
als300.c
als4000.c
atiixp_modem.c
atiixp.c
azt3328.c
azt3328.h
bt87x.c
cmipci.c ALSA: cmipci: Allocate with GFP_KERNEL instead of GFP_ATOMIC 2018-04-16 14:01:31 +02:00
cs4281.c
cs5530.c
ens1370.c
ens1371.c
es1938.c
es1968.c
fm801.c
intel8x0.c
intel8x0m.c
Kconfig
maestro3.c
Makefile
rme32.c
rme96.c
sis7019.c
sis7019.h
sonicvibes.c
via82xx_modem.c
via82xx.c