linux/sound/usb
Takashi Iwai 6815a0b444 ALSA: bcd2000: Add a sanity check for invalid EPs
As syzkaller spotted, currently bcd2000 driver submits a URB with the
fixed EP without checking whether it's actually available, which may
result in a kernel warning like:
  usb 1-1: BOGUS urb xfer, pipe 1 != type 3
  ------------[ cut here ]------------
  WARNING: CPU: 0 PID: 1846 at drivers/usb/core/urb.c:449
  usb_submit_urb+0xf8a/0x11d0
  Modules linked in:
  CPU: 0 PID: 1846 Comm: kworker/0:2 Not tainted
  4.14.0-rc2-42613-g1488251d1a98 #238
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
  Workqueue: usb_hub_wq hub_event
  Call Trace:
   bcd2000_init_device sound/usb/bcd2000/bcd2000.c:289
   bcd2000_init_midi sound/usb/bcd2000/bcd2000.c:345
   bcd2000_probe+0xe64/0x19e0 sound/usb/bcd2000/bcd2000.c:406
   usb_probe_interface+0x35d/0x8e0 drivers/usb/core/driver.c:361
   ....

This patch adds a sanity check of validity of EPs at the device
initialization phase for avoiding the call with an invalid EP.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-10-11 15:14:49 +02:00
..
6fire ALSA: 6fire: Use common error handling code in usb6fire_chip_probe() 2017-09-07 10:29:35 +02:00
bcd2000 ALSA: bcd2000: Add a sanity check for invalid EPs 2017-10-11 15:14:49 +02:00
caiaq ALSA: usb: constify snd_pcm_ops structures 2017-08-19 11:02:27 +02:00
hiface ALSA: usb: constify snd_pcm_ops structures 2017-08-19 11:02:27 +02:00
line6
misc ALSA: usb: constify snd_pcm_ops structures 2017-08-19 11:02:27 +02:00
usx2y ALSA: usx2y: Suppress kernel warning at page allocation failures 2017-10-02 18:10:47 +02:00
card.c ALSA: usb-audio: Check out-of-bounds access by corrupted buffer descriptor 2017-09-22 16:21:31 +02:00
card.h
clock.c
clock.h
debug.h
endpoint.c
endpoint.h
format.c
format.h
helper.c
helper.h
Kconfig
Makefile
midi.c ALSA: usb-audio: Put missing KERN_CONT prefix 2017-08-31 11:02:13 +02:00
midi.h
mixer.c Merge branch 'for-linus' into for-next 2017-08-22 15:44:45 +02:00
mixer.h
mixer_maps.c
mixer_quirks.c
mixer_quirks.h
mixer_scarlett.c
mixer_scarlett.h
mixer_us16x08.c
mixer_us16x08.h
pcm.c ALSA: usb: constify snd_pcm_ops structures 2017-08-19 11:02:27 +02:00
pcm.h
power.h
proc.c
proc.h
quirks-table.h
quirks.c ALSA: usb-audio: Add sample rate quirk for Plantronics C310/C520-M 2017-09-20 22:14:40 +02:00
quirks.h
stream.c
stream.h
usbaudio.h