wifi: mt76: fix wcid->pktid corruption in mt76_wcid_cleanup()

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Nov 30, 2026

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

wifi: mt76: fix wcid->pktid corruption in mt76_wcid_cleanup()

mt76_wcid_cleanup() releases dev->status_lock before calling idr_destroy(&wcid->pktid) to tear down the pktid idr. Meanwhile, mt76_tx_status_skb_add() from tx.c can concurrently insert into that same idr during tx completion handling:

spin_lock_bh(&dev->status_lock);

pid = idr_alloc(&wcid->pktid, skb, MT_PACKET_ID_FIRST, MT_PACKET_ID_MASK, GFP_ATOMIC);

Since idr_destroy() runs outside the lock, it can execute concurrently with idr_alloc() 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 idr_destroy() before releasing dev->status_lock, so that the table teardown and any concurrent insertion are mutually exclusive.

ProductVersions
Linux Linuxbd1e3e7b693c17a04e7d2bd9119daa482b7c7720 to before 881063c29779c737b0249748a9ea9453d233a353 Affectedbd1e3e7b693c17a04e7d2bd9119daa482b7c7720 to before 4fb0a25ac84d15d20588d110faf9511e78626da8 Affectedbd1e3e7b693c17a04e7d2bd9119daa482b7c7720 to before 4e5917e0ee83756868b9c0747c91e5ad0ee2177e Affectedbd1e3e7b693c17a04e7d2bd9119daa482b7c7720 to before f2bdff69bd8dc8b85a5d79f41f37fc9b95b66943 Affectedbd1e3e7b693c17a04e7d2bd9119daa482b7c7720 to before 158c1145fe7ddd82914011a00de7cc3262616b16 Affected
Linux Linux5.16 Affectedbefore 5.16 Not Affected6.6.163 through 6.6.* Not Affected6.12.119 through 6.12.* Not Affected6.18.65 through 6.18.* Not Affected7.3.6 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.