Skip to content

sound: Add sanity checks for invalid EPs

Takashi Iwai alsa-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 of 9 patches 15 repliesIn review
  2. v17 of 9 patches 5 repliesSuperseded

8 of 9 patches are in this archive. The cover letter announces 9.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9usb: core: Add a helper function to check the validity of EP type in URBdrivers/usb/core/urb.c include/linux/usb.h+28 -43 replies
2/9ALSA: bcd2000: Add a sanity check for invalid EPssound/usb/bcd2000/bcd2000.c+7 -00 replies
3/9ALSA: caiaq: Add a sanity check for invalid EPssound/usb/caiaq/device.c+7 -04 replies
4/9ALSA: line6: Add a sanity check for invalid EPssound/usb/line6/driver.c+7 -04 replies
5/9ALSA: usb-audio: Add sanity checks for invalid EPssound/usb/midi.c+30 -80 replies
7/9ALSA: hiface: Add sanity checks for invalid EPssound/usb/hiface/pcm.c+7 -20 replies
8/9ALSA: caiaq: Add yet more sanity checks for invalid EPssound/usb/caiaq/input.c+9 -00 replies
9/9ALSA: line6: Add yet more sanity checks for invalid EPssound/usb/line6/driver.c sound/usb/line6/midi.c+26 -142 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndrey KonovalovGreg Kroah-HartmanJohan Hovold
SeriesA-b
1/9T-b
2/9T-b
3/9T-b R-b
4/9T-b
5/9
7/9
8/9
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/9] sound: Add sanity checks for invalid EPs

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(-)
Signature · 6 lines
2.14.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html