Re: [BUG] ath9k_htc_tx_cleanup_timer -- ODEBUG free-active-timer and use-after-free on USB unplug

From: Chad Aldreda

Date: Fri Nov 20 2026 - 13:35:45 EST


Hi Farhad,

Thanks for the reproducer. It hits neither of the two paths I guessed
at. It withholds the reply to WMI_TARGET_IC_UPDATE_CMDID, so
ath9k_htc_update_cap_target() times out in ath9k_htc_start(), which
logs that only at debug level, still arms tx.cleanup_timer, and returns
the error. mac80211 treats the start as failed and never calls
ath9k_htc_stop(), so the timer is still pending when the device is
unplugged, and then fires on the freed hw (the KASAN report).

Mikołaj Pisula found the same thing and posted a fix this week, which
Toke has applied to ath9k-pending:

https://lore.kernel.org/linux-wireless/20261117103918.33701-1-mikolaj@xxxxxxx/
https://git.kernel.org/toke/ath9k-pending/c/176a947f3d98

I haven't run your reproducer against it. If you do, a Tested-by on
that thread would still be welcome.

Chad

This reply was drafted with an AI assistant (Claude Opus 5.5).