CVE-2026-139739: wifi: ath11k: fix locking problem in ath11k_dp_rx_tid_del_func()
In the Linux kernel, the following vulnerability has been resolved:
wifi: ath11k: fix locking problem in ath11kdprxtiddelfunc()
In this function, we iterate over dp->reocmdcacheflushlist using listforeachentrysafe(), under dp->reocmdlock for concurrent access, and for each expired entries we : - drop the lock - call ath11kdpreocacheflush() - kfree() the entry - retake the lock to keep on iterating
listforeachentrysafe() protects us from deleting the entry during iteration but doesn't protect for concurrent access. So another thread can take the lock and modify the list in between and crash like below.
To fix the issue, move all entries that needs to be freed to a local list while under the lock and then iterate over the list to free the entries without holding the lock.
BUG: Unable to handle kernel paging request at virtual address 00000010ddbeef8c Call trace: ath11kdprxtiddelfunc+0x164/0x3c8 ath11kdpprocessreostatus+0x1d4/0x2fc ath11kdpservicesrng+0x334/0x338 ath11kpcicextgrpnapipoll+0x30/0xc0 napipoll+0x34/0x184 napithreadedpoll+0xb4/0x1d8 kthread+0xdc/0xe0 retfromfork+0x10/0x20
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPLSILICONZ-1
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In ath11k_dp_rx_tid_del_func(), move entries to be freed from dp->reo_cmd_cache_flush_list to a local list using list_for_each_entry_safe() while holding dp->reo_cmd_lock, then release the lock and iterate over the local list to free the entries.