alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9] sound: Add sanity checks for invalid EPs
@ 2017-10-11 10:36 Takashi Iwai
  2017-10-11 10:36 ` [PATCH v2 6/9] ALSA: usx2y: " Takashi Iwai
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Takashi Iwai @ 2017-10-11 10:36 UTC (permalink / raw)
  To: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw
  Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA, Andrey Konovalov, Greg KH

Hi,

this is a revised patch set to cover the codes that may submit URBs
containing invalid EPs without validation, which result in the kernel
warning from the USB core.  The first patch adds a new helper for
simplifying the EP check, and the rest applies it at needed places.

The original issues were spotted by syzkaller, and I put a few others
for covering more similar cases.

The only updated code in v2 is about the first patch to add
usb_urb_ep_type_check() helper (in addition to tested-by tag from
Andrey).  Typos were fixed and it's called also from usb_submit_urb()
as Greg suggested, too.

USB devs: does this look OK now?

If yes, and if I get acks, I can take the patches to sound tree.  Or I
don't mind if you take all to usb tree, too.  Or maybe better, I'll
prepare an immutable branch based on 4.4.14-rc (rc4 for now) in case
you want to pull into both trees.  Let me know your wish.


thanks,

Takashi

===

Takashi Iwai (9):
  usb: core: Add a helper function to check the validity of EP type in
    URB
  ALSA: bcd2000: Add a sanity check for invalid EPs
  ALSA: caiaq: Add a sanity check for invalid EPs
  ALSA: line6: Add a sanity check for invalid EPs
  ALSA: usb-audio: Add sanity checks for invalid EPs
  ALSA: usx2y: Add sanity checks for invalid EPs
  ALSA: hiface: Add sanity checks for invalid EPs
  ALSA: caiaq: Add yet more sanity checks for invalid EPs
  ALSA: line6: Add yet more sanity checks for invalid EPs

 drivers/usb/core/urb.c          | 30 ++++++++++++++++++++++++++----
 include/linux/usb.h             |  2 ++
 sound/usb/bcd2000/bcd2000.c     |  7 +++++++
 sound/usb/caiaq/device.c        |  7 +++++++
 sound/usb/caiaq/input.c         |  9 +++++++++
 sound/usb/hiface/pcm.c          |  9 +++++++--
 sound/usb/line6/driver.c        | 30 ++++++++++++++++++++++--------
 sound/usb/line6/midi.c          | 17 +++++++++++------
 sound/usb/midi.c                | 38 ++++++++++++++++++++++++++++++--------
 sound/usb/usx2y/usbusx2y.c      |  8 ++++++++
 sound/usb/usx2y/usbusx2yaudio.c |  3 +++
 11 files changed, 132 insertions(+), 28 deletions(-)

-- 
2.14.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2017-10-11 15:05 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-11 10:36 [PATCH v2 0/9] sound: Add sanity checks for invalid EPs Takashi Iwai
2017-10-11 10:36 ` [PATCH v2 6/9] ALSA: usx2y: " Takashi Iwai
     [not found]   ` <20171011103646.11879-7-tiwai-l3A5Bk7waGM@public.gmane.org>
2017-10-11 14:33     ` Johan Hovold
2017-10-11 14:43       ` Takashi Iwai
     [not found] ` <20171011103646.11879-1-tiwai-l3A5Bk7waGM@public.gmane.org>
2017-10-11 10:36   ` [PATCH v2 1/9] usb: core: Add a helper function to check the validity of EP type in URB Takashi Iwai
2017-10-11 14:14     ` Johan Hovold
2017-10-11 14:31       ` Takashi Iwai
     [not found]         ` <s5hbmld92ok.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2017-10-11 14:58           ` Johan Hovold
2017-10-11 10:36   ` [PATCH v2 2/9] ALSA: bcd2000: Add a sanity check for invalid EPs Takashi Iwai
2017-10-11 10:36   ` [PATCH v2 3/9] ALSA: caiaq: " Takashi Iwai
2017-10-11 14:20     ` Johan Hovold
2017-10-11 14:40       ` Takashi Iwai
     [not found]         ` <s5ha80x928r.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2017-10-11 14:49           ` Johan Hovold
2017-10-11 15:05             ` Takashi Iwai
2017-10-11 10:36   ` [PATCH v2 4/9] ALSA: line6: " Takashi Iwai
2017-10-11 14:28     ` Johan Hovold
2017-10-11 14:45       ` Takashi Iwai
     [not found]         ` <s5h7ew1920z.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2017-10-11 14:52           ` Johan Hovold
2017-10-11 14:58             ` Takashi Iwai
2017-10-11 10:36   ` [PATCH v2 5/9] ALSA: usb-audio: Add sanity checks " Takashi Iwai
2017-10-11 10:36   ` [PATCH v2 7/9] ALSA: hiface: " Takashi Iwai
2017-10-11 10:36   ` [PATCH v2 8/9] ALSA: caiaq: Add yet more " Takashi Iwai
2017-10-11 10:36   ` [PATCH v2 9/9] ALSA: line6: " Takashi Iwai
     [not found]     ` <20171011103646.11879-10-tiwai-l3A5Bk7waGM@public.gmane.org>
2017-10-11 14:39       ` Johan Hovold
2017-10-11 14:48         ` Takashi Iwai
2017-10-11 13:03 ` [PATCH v2 0/9] sound: Add " Greg KH
     [not found]   ` <20171011130329.GI27734-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2017-10-11 13:15     ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).