Skip to content

USB: serial: fix interface URB leaks and use-after-free

Johan Hovold stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8USB: serial: io_edgeport: fix memory leaks in attach error pathdrivers/usb/serial/io_edgeport.c+28 -110 replies
2/8USB: serial: io_edgeport: fix memory leaks in probe error pathdrivers/usb/serial/io_edgeport.c+10 -70 replies
3/8USB: serial: keyspan: fix use-after-free in probe error pathdrivers/usb/serial/keyspan.c+4 -00 replies
4/8USB: serial: keyspan: fix URB unlinkdrivers/usb/serial/keyspan.c+10 -160 replies
5/8USB: serial: keyspan: fix debug and error messagesdrivers/usb/serial/keyspan.c+25 -170 replies
6/8USB: serial: mxuport: fix use-after-free in probe error pathdrivers/usb/serial/mxuport.c+10 -00 replies
7/8USB: serial: quatech2: fix use-after-free in probe error pathdrivers/usb/serial/quatech2.c+1 -00 replies
8/8USB: serial: fix minor-number allocationdrivers/usb/serial/usb-serial.c+2 -12 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchGreg Kroah-Hartman
1/8
2/8
3/8
4/8
5/8
6/8
7/8
8/8A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] USB: serial: fix interface URB leaks and use-after-free

This series fixes a number of issues where resources were not properly released on probe errors. Typically, URBs allocated and submitted in an attach callback were never unlinked or released in a matching release callback. This could lead to memory leaks and use-after-free bugs as we could end up with unbound interfaces with active URBs.

Included is also a couple of minor fixes and clean ups of the keyspan driver, and a fix of how we deal with minor-number exhaustion in core.

Johan

Johan Hovold (8):
USB: serial: io_edgeport: fix memory leaks in attach error path
USB: serial: io_edgeport: fix memory leaks in probe error path
USB: serial: keyspan: fix use-after-free in probe error path
USB: serial: keyspan: fix URB unlink
USB: serial: keyspan: fix debug and error messages
USB: serial: mxuport: fix use-after-free in probe error path
USB: serial: quatech2: fix use-after-free in probe error path
USB: serial: fix minor-number allocation

 drivers/usb/serial/io_edgeport.c | 56 +++++++++++++++++++++----------
 drivers/usb/serial/keyspan.c     | 72 ++++++++++++++++++++++------------------
 drivers/usb/serial/mxuport.c     | 10 ++++++
 drivers/usb/serial/quatech2.c    |  1 +
 drivers/usb/serial/usb-serial.c  |  3 +-
 5 files changed, 90 insertions(+), 52 deletions(-)
Signature · 1 line
2.7.3