CVE-2026-139120
published critical CVSS 3.1 · 9.8blk-mq: set up a queue under tag_list_lock
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux868f2f0b72068a097508b6e8870a8950fd8eb7ef to < e7e089b61901be0f4bac6b1d8c8f8e25cf178280 · 868f2f0b72068a097508b6e8870a8950fd8eb7ef to < 515e211124113b4faecf3b0cb20087965286ee0c · 868f2f0b72068a097508b6e8870a8950fd8eb7ef to < 4fcc499ea9bc31b02393904a1903e794d146f5f7 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux4.6 (affected) · 0 to < 4.6 (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Pending Fix | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Pending Fix | Not stated | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: blk-mq: set up a queue under tag_list_lock blk_mq_init_allocated_queue() only takes tag_list_lock at the end, when it adds the queue to the set. Before that it sizes the queue by set->nr_hw_queues, hands out set->tags[], maps by set->map[], and blk_mq_map_swqueue() frees tags of the set. An update clearing the maps at that time makes the new queue free tags that all the other queues share. An NVMe controller reset during a namespace scan does exactly that. Take the lock before the first look at the set. An update can be part of error handling, so the allocations under the lock must not wait for IO: memalloc_noio_save(), as in add_disk_fwnode().
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 9.8 / 10
- Severity
- critical
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:N - On an nvme-tcp host, a hostile or on-path target sends a Namespace-Changed AEN and Identify data, driving nvme_scan_work→nvme_scan_ns_async→nvme_alloc_ns→blk_mq_alloc_disk→blk_mq_init_allocated_queue(). It also sends a Persistent-Internal-Error AEN and a Set Features Number-of-Queues result, driving nvme_reset_ctrl→nvme_tcp_configure_io_queues→blk_mq_update_nr_hw_queues on the same ctrl->tagset over routable TCP. AC:L - The target controls both sides: it times the scan's Identify completions against the I/O-queue Connect completions of the immediate reset. nvme_stop_ctrl() never flushes scan_work, and nr_maps=2 makes every update clear mq_map. The target can also change the queue and namespace counts to widen the window, and missed attempts are harmless and repeatable. PR:N - The attacker is the NVMe/TCP target or an on-path spoofer and needs no account or capability on the host. AENs, Identify data and Set Features results are accepted on the established fabrics session, and TLS/DH-HMAC-CHAP are optional. The root-only local triggers (reset_controller, NVME_IOCTL_RESET) are not needed. UI:N - scan_work, the reset_work reconnect and the parallel nvme_scan_ns_async namespace allocation all run from nvme_wq/nvme_reset_wq kernel workers in response to target-sent AEN completions. No host user action is needed once the fabrics controller is connected. S:U - The freed blk_mq_tags and request pages, and the out-of-bounds hctx pointer, are all host kernel heap memory in the block layer. No VM, IOMMU or other security-authority boundary is crossed. C:H - With the map cleared, the new queue's blk_mq_map_swqueue() calls __blk_mq_free_map_and_rqs() on set->tags[i] that other namespaces' hctx->tags still use. Their later I/O reads the freed sbitmap, static_rqs and request pages, a sprayable UAF read. The grow case also reads queue_hw_ctx[] past its kcalloc'd end. I:H - blk_mq_get_tag() and blk_mq_rq_ctx_init() then write into freed blk_mq_tags and request pages. With a grown queue count, queue_hctx() returns an out-of-bounds pointer that blk_mq_map_swqueue() writes through (cpumask_set_cpu, hctx->ctxs[nr_ctx++]=ctx). This memory corruption is usable for control-flow hijack. A:H - Even without exploitation, I/O on a stale hctx->tags or through the wild hctx pointer oopses the host in blk_mq_get_tag or blk_mq_map_swqueue. That takes down every namespace sharing the controller's tag set, and the target can repeat the AEN and reset cycle at will.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 868f2f0b72068a097508b6e8870a8950fd8eb7ef to < e7e089b61901be0f4bac6b1d8c8f8e25cf178280 (affected · git)868f2f0b72068a097508b6e8870a8950fd8eb7ef to < 515e211124113b4faecf3b0cb20087965286ee0c (affected · git)868f2f0b72068a097508b6e8870a8950fd8eb7ef to < 4fcc499ea9bc31b02393904a1903e794d146f5f7 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 4.6 (affected)0 to < 4.6 (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
3Provider assertions
1Linux · cna
blk-mq: set up a queue under tag_list_lock
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 6d6a55197f5e2dff87396b23d2d5abf10ee8751986262a44e544b3a33ecdddd3
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record