[PATCH v2 0/4] USB: serial: fix port tear down use-after-free

Johan Hovold posted 4 patches 1 month, 1 week ago
drivers/usb/serial/bus.c        |  6 +++++-
drivers/usb/serial/usb-serial.c | 32 ++++++++++++++++++++++++++------
include/linux/usb/serial.h      |  1 +
3 files changed, 32 insertions(+), 7 deletions(-)
[PATCH v2 0/4] USB: serial: fix port tear down use-after-free
Posted by Johan Hovold 1 month, 1 week ago
When addressing a port probe ordering issue in digi_acceleport recently
I realised that we have a corresponding general problem during
disconnect, but I didn't have time to address it straight away.

Now syzbot has managed to trigger one of its symptoms and people have
already started submitting incomplete band-aids so here is a proper
fix.

When testing the fix I also noticed that we have an ordering issue when
deregistering drivers that can result in similar use-after-free.

Johan


Changes in v2:
 - fix dynamic id driver deregistration race (new)
 - remove "new_id" attributes before deregistering USB driver
 - use iterator for driver deregistration (new)


Johan Hovold (4):
  USB: serial: fix port tear down use-after-free
  USB: serial: fix dynamic id driver deregistration race
  USB: serial: fix driver deregistration order
  USB: serial: use iterator for driver deregistration

 drivers/usb/serial/bus.c        |  6 +++++-
 drivers/usb/serial/usb-serial.c | 32 ++++++++++++++++++++++++++------
 include/linux/usb/serial.h      |  1 +
 3 files changed, 32 insertions(+), 7 deletions(-)

-- 
2.54.0