ALSA: line6: Perform sanity check for each URB creation
authorTakashi Iwai <tiwai@suse.de>
Fri, 10 Jul 2020 13:33:51 +0000 (15:33 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 10 Jul 2020 14:29:18 +0000 (16:29 +0200)
commit6e8a914ad619042c5f25a4feb663357c4170fd8d
tree2e71df4a9d0306d68b9675bc2621b8ba65e829aa
parentf79a732a8325dfbd570d87f1435019d7e5501c6d
ALSA: line6: Perform sanity check for each URB creation

LINE6 drivers create stream URBs with a fixed pipe without checking
its validity, and this may lead to a kernel WARNING at the submission
when a malformed USB descriptor is passed.

For avoiding the kernel warning, perform the similar sanity checks for
each pipe type at creating a URB.

Reported-by: syzbot+c190f6858a04ea7fbc52@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/s5hv9iv4hq8.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/line6/capture.c
sound/usb/line6/playback.c