Skip to content

rsi: fix use-after-free, memleak and sleep-while-atomic

Johan Hovold linux-usb linux-wireless lkml netdev stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5rsi: fix use-after-free on failed probe and unbinddrivers/net/wireless/rsi/rsi_91x_usb.c+17 -11 reply
2/5rsi: fix use-after-free on probe errorsdrivers/net/wireless/rsi/rsi_91x_hal.c+6 -60 replies
3/5rsi: fix memory leak on failed URB submissiondrivers/net/wireless/rsi/rsi_91x_usb.c+3 -10 replies
4/5rsi: fix non-atomic allocation in completion handlerdrivers/net/wireless/rsi/rsi_91x_usb.c+7 -60 replies
5/5rsi: add missing endpoint sanity checksdrivers/net/wireless/rsi/rsi_91x_usb.c+10 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] rsi: fix use-after-free, memleak and sleep-while-atomic

The syzbot fuzzer has reported two separate use-after-free issues, which are fixed by the first two patches.

Turns out there were more gems in this driver and the next two patches fixes a memory leak and a potential sleep-while-atomic found through inspection.

The last one tightens the seemingly broken endpoint sanity check which would have the driver try to submit a bulk URB to the default pipe (and fail).

Tested using a mockup device.

Johan

Johan Hovold (5):
rsi: fix use-after-free on failed probe and unbind
rsi: fix use-after-free on probe errors
rsi: fix memory leak on failed URB submission
rsi: fix non-atomic allocation in completion handler
rsi: add missing endpoint sanity checks

 drivers/net/wireless/rsi/rsi_91x_hal.c | 12 +++----
 drivers/net/wireless/rsi/rsi_91x_usb.c | 47 ++++++++++++++++++++------
 2 files changed, 43 insertions(+), 16 deletions(-)
Signature · 1 line
2.24.0