CVE-2026-139493: wifi: mt76: fix wcid->pktid corruption in mt76_wcid_cleanup()
In the Linux kernel, the following vulnerability has been resolved:
wifi: mt76: fix wcid->pktid corruption in mt76wcidcleanup()
mt76wcidcleanup() releases dev->statuslock before calling idrdestroy(&wcid->pktid) to tear down the pktid idr. Meanwhile, mt76txstatusskbadd() from tx.c can concurrently insert into that same idr during tx completion handling:
spinlockbh(&dev->statuslock);
pid = idralloc(&wcid->pktid, skb, MTPACKETIDFIRST, MTPACKETIDMASK, GFPATOMIC);
Since idrdestroy() runs outside the lock, it can execute concurrently with idralloc() on the same idr, corrupting its internal data structures. Because idr nodes are freed through the generic slab allocator, this corruption can resurface later as an unrelated-looking crash anywhere in the kernel that happens to reuse the same freed memory.
Fix this by calling idrdestroy() before releasing dev->statuslock, so that the table teardown and any concurrent insertion are mutually exclusive.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
Call idr_destroy(&wcid->pktid) before releasing dev->status_lock, so teardown is mutually exclusive with concurrent idr_alloc() calls.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the Linux kernel mt76 Wi-Fi driver are exposed when the affected cleanup path can run concurrently with transmit-completion handling that adds packet status entries.
What conditions are needed to trigger the corruption?
A race is required between mt76_wcid_cleanup() destroying a WCID packet-ID IDR and mt76_tx_status_skb_add() inserting into that same IDR during TX completion processing. The vulnerable behavior occurs because the destruction previously happened after dev->status_lock was released.
What is the likely operational impact?
The race can corrupt internal IDR data structures. Because corrupted IDR nodes are freed through the generic slab allocator, the visible result may be a later, unrelated-looking kernel crash when that memory is reused.
How can this be remediated?
Apply a kernel update containing the mt76 fix that performs idr_destroy(&wcid->pktid) before releasing dev->status_lock. This makes IDR teardown mutually exclusive with concurrent packet-ID insertion.