* [PATCH] wifi: rtw89: usb: cancel TX URBs on probe failure
@ 2026-12-01 20:24 Artem Dinaburg
2026-12-02 1:48 ` Ping-Ke Shih
0 siblings, 1 reply; 2+ messages in thread
From: Artem Dinaburg @ 2026-12-01 20:24 UTC (permalink / raw)
To: pkshih; +Cc: linux-wireless
Chip information setup can leave firmware TX URBs pending when USB probe
fails. The error path then frees the USB private state while those URBs
still reference its TX anchor.
Cancel pending TX URBs before core teardown, as the disconnect path does.
Found and fixed with AI assistance; validated with a KASAN-enabled
kernel build.
Fixes: 26a42d804aa8 ("wifi: rtw89: usb: anchor TX URBs")
Cc: stable@vger.kernel.org
Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
---
KASAN report from a USB emulation replay of a failed probe:
rtw89_8852bu ... failed to setup chip information
rtw89_8852bu ... probe with driver rtw89_8852bu failed with error -110
BUG: KASAN: slab-use-after-free in usb_anchor_suspend_wakeups+0x1b/0x30
Write of size 4 ...
A reproducer is available privately on request.
drivers/net/wireless/realtek/rtw89/usb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/realtek/rtw89/usb.c b/drivers/net/wireless/realtek/rtw89/usb.c
index 8dc2c93e502e..38d2a92fb984 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.c
+++ b/drivers/net/wireless/realtek/rtw89/usb.c
@@ -1288,6 +1288,7 @@ int rtw89_usb_probe(struct usb_interface *intf,
return 0;
err_core_deinit:
+ rtw89_usb_cancel_tx_bufs(rtwusb);
rtw89_core_deinit(rtwdev);
err_deinit_rx:
rtw89_usb_deinit_rx(rtwdev);
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-02 1:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 20:24 [PATCH] wifi: rtw89: usb: cancel TX URBs on probe failure Artem Dinaburg
2026-12-02 1:48 ` Ping-Ke Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox