]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: ath6kl: fix use-after-free in aggr_reset_state()
authorDaniel Hodges <git@danielhodges.dev>
Fri, 6 Feb 2026 18:52:07 +0000 (13:52 -0500)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Thu, 2 Jul 2026 21:05:00 +0000 (14:05 -0700)
commitba7debb4dd6427386862220e8335a53a4bfc235d
treef91de7708621cc27d2b1a5152d214169c423f4fe
parentdad9f96945d77ecd4708f730c06ef54dcd8cc057
wifi: ath6kl: fix use-after-free in aggr_reset_state()

The aggr_reset_state() function uses timer_delete() (non-synchronous)
for the aggregation timer before proceeding to delete TID state and
before the structure is freed by callers like aggr_module_destroy().

If the timer callback (aggr_timeout) is executing when aggr_reset_state()
is called, the callback will continue to access aggr_conn fields like
rx_tid[] and stat[] which may be freed immediately after by
kfree(aggr_info->aggr_conn) in aggr_module_destroy().

Additionally, the timer callback can re-arm itself via mod_timer() while
aggr_reset_state() is running, creating a more complex race condition.

Use timer_delete_sync() instead to ensure any running timer callback
has completed before returning.

Fixes: bdcd81707973 ("Add ath6kl cleaned up driver")
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Hodges <git@danielhodges.dev>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Link: https://patch.msgid.link/20260206185207.30098-1-git@danielhodges.dev
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath6kl/txrx.c