{"id":"CVE-2026-139493","aliases":["CVE-2026-139493"],"related":[],"kind":"vulnerability","state":"published","title":"wifi: mt76: fix wcid->pktid corruption in mt76_wcid_cleanup()","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-11-30T13:35:15.699Z","modified":"2026-11-30T14:19:24.123Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","fixed":"881063c29779c737b0249748a9ea9453d233a353","status":"affected"},{"type":"git","introduced":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","fixed":"4fb0a25ac84d15d20588d110faf9511e78626da8","status":"affected"},{"type":"git","introduced":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","fixed":"4e5917e0ee83756868b9c0747c91e5ad0ee2177e","status":"affected"},{"type":"git","introduced":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","fixed":"f2bdff69bd8dc8b85a5d79f41f37fc9b95b66943","status":"affected"},{"type":"git","introduced":"bd1e3e7b693c17a04e7d2bd9119daa482b7c7720","fixed":"158c1145fe7ddd82914011a00de7cc3262616b16","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.16","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.16","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.119","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.65","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/881063c29779c737b0249748a9ea9453d233a353","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4fb0a25ac84d15d20588d110faf9511e78626da8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4e5917e0ee83756868b9c0747c91e5ad0ee2177e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f2bdff69bd8dc8b85a5d79f41f37fc9b95b66943","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/158c1145fe7ddd82914011a00de7cc3262616b16","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139493","url":"https://www.cve.org/CVERecord?id=CVE-2026-139493","licence":"CVE Terms of Use","modified":"2026-11-30T13:35:15.699Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139493","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139493","licence":"Public domain","modified":"2026-11-30T14:19:24.123Z"}],"updatedAt":"2026-11-30T14:33:27.188Z","epss":{"score":0.00201,"percentile":0.1047,"date":"2026-12-01T12:00:22.000Z"}}