linux/sound/usb/usx2y
Takashi Iwai f9a1c37229 ALSA: usx2y: Fix invalid stream URBs
The us122l driver creates URBs per the fixed endpoints, and this may
end up with URBs with inconsistent pipes when a fuzzer or a malicious
program deals with the manipulated endpoints.  It ends up with a
kernel warning like:

  usb 1-1: BOGUS urb xfer, pipe 0 != type 3
  ------------[ cut here ]------------
  WARNING: CPU: 0 PID: 24 at drivers/usb/core/urb.c:471
  usb_submit_urb+0x113e/0x1400
  Call Trace:
   usb_stream_start+0x48a/0x9f0 sound/usb/usx2y/usb_stream.c:690
   us122l_start+0x116/0x290 sound/usb/usx2y/us122l.c:365
   us122l_create_card sound/usb/usx2y/us122l.c:502
   us122l_usb_probe sound/usb/usx2y/us122l.c:588
   ....

For avoiding the bad access, this patch adds a few sanity checks of
the validity of created URBs like previous similar fixes using the new
usb_urb_ep_type_check() helper function.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-06 15:03:38 +01:00
..
Makefile ALSA: Add USB US122L driver 2008-08-01 13:37:12 +02:00
us122l.c ALSA: us122l: Use common error handling code in us122l_create_card() 2017-09-07 10:27:42 +02:00
us122l.h ALSA: us122l: clean up US144 handling 2017-05-15 11:02:08 +02:00
usb_stream.c ALSA: usx2y: Fix invalid stream URBs 2017-11-06 15:03:38 +01:00
usb_stream.h ALSA: usx2y: Move UAPI definition into include/uapi/sound/usb_stream.h 2015-01-28 17:33:49 +01:00
usbus428ctldefs.h
usbusx2y.c ALSA: usx2y: Add sanity checks for invalid EPs 2017-10-11 16:52:33 +02:00
usbusx2y.h ALSA: usx2y: Don't peep the card internal object 2014-02-17 10:16:25 +01:00
usbusx2yaudio.c ALSA: usx2y: Add sanity checks for invalid EPs 2017-10-11 16:52:33 +02:00
usx2y.h
usx2yhwdeppcm.c ALSA: usb: constify snd_pcm_ops structures 2017-08-19 11:02:27 +02:00
usx2yhwdeppcm.h ALSA: sound/usb/usx2y: fix sparse warning: Should it be static? 2009-02-26 09:57:17 +01:00
usX2Yhwdep.c ALSA: usb-audio: replace /proc/bus/usb by /dev/bus/usb 2017-04-17 10:23:55 +02:00
usX2Yhwdep.h