{"id":"CVE-2026-139493","state":"PUBLISHED","title":"wifi: mt76: fix wcid->pktid corruption in mt76_wcid_cleanup()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: mt76: fix wcid->pktid corruption in mt76_wcid_cleanup()\n\nmt76_wcid_cleanup() releases dev->status_lock before calling\nidr_destroy(&wcid->pktid) to tear down the pktid idr. Meanwhile,\nmt76_tx_status_skb_add() from tx.c can concurrently insert into\nthat same idr during tx completion handling:\n\n\tspin_lock_bh(&dev->status_lock);\n\n\tpid = idr_alloc(&wcid->pktid, skb, MT_PACKET_ID_FIRST,\n\t\t\tMT_PACKET_ID_MASK, GFP_ATOMIC);\n\nSince idr_destroy() runs outside the lock, it can execute concurrently\nwith idr_alloc() on the same idr, corrupting its internal data\nstructures. Because idr nodes are freed through the generic slab\nallocator, this corruption can resurface later as an unrelated-looking\ncrash anywhere in the kernel that happens to reuse the same freed\nmemory.\n\nFix this by calling idr_destroy() before releasing dev->status_lock,\nso that the table teardown and any concurrent insertion are mutually\nexclusive.","publishedAt":"2026-11-30T13:35:15.699Z","updatedAt":"2026-11-30T13:35:15.699Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","status":"affected","lessThan":"881063c29779c737b0249748a9ea9453d233a353","versionType":"git"},{"version":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","status":"affected","lessThan":"4fb0a25ac84d15d20588d110faf9511e78626da8","versionType":"git"},{"version":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","status":"affected","lessThan":"4e5917e0ee83756868b9c0747c91e5ad0ee2177e","versionType":"git"},{"version":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","status":"affected","lessThan":"f2bdff69bd8dc8b85a5d79f41f37fc9b95b66943","versionType":"git"},{"version":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","status":"affected","lessThan":"158c1145fe7ddd82914011a00de7cc3262616b16","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireless/mediatek/mt76/mac80211.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireless/mediatek/mt76/mac80211.c"]}],"references":["https://git.kernel.org/stable/c/881063c29779c737b0249748a9ea9453d233a353","https://git.kernel.org/stable/c/4fb0a25ac84d15d20588d110faf9511e78626da8","https://git.kernel.org/stable/c/4e5917e0ee83756868b9c0747c91e5ad0ee2177e","https://git.kernel.org/stable/c/f2bdff69bd8dc8b85a5d79f41f37fc9b95b66943","https://git.kernel.org/stable/c/158c1145fe7ddd82914011a00de7cc3262616b16"],"weaknesses":[],"ingestedAt":"2026-11-30T13:50:04.417Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139493.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139493","state":"PUBLISHED","datePublished":"2026-11-30T13:35:15.699Z","dateUpdated":"2026-11-30T13:35:15.699Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.937Z"},"containers":{"cna":{"title":"wifi: mt76: fix wcid->pktid corruption in mt76_wcid_cleanup()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: mt76: fix wcid->pktid corruption in mt76_wcid_cleanup()\n\nmt76_wcid_cleanup() releases dev->status_lock before calling\nidr_destroy(&wcid->pktid) to tear down the pktid idr. Meanwhile,\nmt76_tx_status_skb_add() from tx.c can concurrently insert into\nthat same idr during tx completion handling:\n\n\tspin_lock_bh(&dev->status_lock);\n\n\tpid = idr_alloc(&wcid->pktid, skb, MT_PACKET_ID_FIRST,\n\t\t\tMT_PACKET_ID_MASK, GFP_ATOMIC);\n\nSince idr_destroy() runs outside the lock, it can execute concurrently\nwith idr_alloc() on the same idr, corrupting its internal data\nstructures. Because idr nodes are freed through the generic slab\nallocator, this corruption can resurface later as an unrelated-looking\ncrash anywhere in the kernel that happens to reuse the same freed\nmemory.\n\nFix this by calling idr_destroy() before releasing dev->status_lock,\nso that the table teardown and any concurrent insertion are mutually\nexclusive."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","status":"affected","lessThan":"881063c29779c737b0249748a9ea9453d233a353","versionType":"git"},{"version":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","status":"affected","lessThan":"4fb0a25ac84d15d20588d110faf9511e78626da8","versionType":"git"},{"version":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","status":"affected","lessThan":"4e5917e0ee83756868b9c0747c91e5ad0ee2177e","versionType":"git"},{"version":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","status":"affected","lessThan":"f2bdff69bd8dc8b85a5d79f41f37fc9b95b66943","versionType":"git"},{"version":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","status":"affected","lessThan":"158c1145fe7ddd82914011a00de7cc3262616b16","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireless/mediatek/mt76/mac80211.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/wireless/mediatek/mt76/mac80211.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/881063c29779c737b0249748a9ea9453d233a353"},{"url":"https://git.kernel.org/stable/c/4fb0a25ac84d15d20588d110faf9511e78626da8"},{"url":"https://git.kernel.org/stable/c/4e5917e0ee83756868b9c0747c91e5ad0ee2177e"},{"url":"https://git.kernel.org/stable/c/f2bdff69bd8dc8b85a5d79f41f37fc9b95b66943"},{"url":"https://git.kernel.org/stable/c/158c1145fe7ddd82914011a00de7cc3262616b16"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:35:15.699Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}