]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Fix NULL dereference at parsing BADD
authorTakashi Iwai <tiwai@suse.de>
Fri, 22 Nov 2019 11:28:40 +0000 (12:28 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 22 Nov 2019 13:08:31 +0000 (14:08 +0100)
commitbc49a29e51d350ca36a89724693ba11b8a139293
tree9d6c452b0de15fb400d64f2cb8575a9b952f0eef
parent741bfb2db324bf00321321511800376481ee13ea
ALSA: usb-audio: Fix NULL dereference at parsing BADD

snd_usb_mixer_controls_badd() that parses UAC3 BADD profiles misses a
NULL check for the given interfaces.  When a malformed USB descriptor
is passed, this may lead to an Oops, as spotted by syzkaller.
Skip the iteration if the interface doesn't exist for avoiding the
crash.

Fixes: 6c95e6e1187e ("ALSA: usb: add UAC3 BADD profiles support")
Reported-by: syzbot+a36ab65c6653d7ccdd62@syzkaller.appspotmail.com
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191122112840.24797-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer.c