summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-10-04 15:03:40 +0200
committerTakashi Iwai <tiwai@suse.de>2017-10-11 15:14:49 +0200
commit6815a0b444572527256f0d0efd8efe3ddede6018 (patch)
tree4ce0bcd84bf6931a1e7e2d018b7c44580cde1e2d /arch
parente901b9873876ca30a09253731bd3a6b00c44b5b0 (diff)
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>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions