{"api_version":"1","generated_at":"2026-12-01T13:51:15+00:00","cve":"CVE-2026-139120","urls":{"html":"https://cve.report/CVE-2026-139120","api":"https://cve.report/api/cve/CVE-2026-139120.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139120","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139120"},"summary":{"title":"blk-mq: set up a queue under tag_list_lock","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nblk-mq: set up a queue under tag_list_lock\n\nblk_mq_init_allocated_queue() only takes tag_list_lock at the end, when\nit adds the queue to the set. Before that it sizes the queue by\nset->nr_hw_queues, hands out set->tags[], maps by set->map[], and\nblk_mq_map_swqueue() frees tags of the set. An update clearing the maps\nat that time makes the new queue free tags that all the other queues\nshare. An NVMe controller reset during a namespace scan does exactly\nthat.\n\nTake the lock before the first look at the set. An update can be part of\nerror handling, so the allocations under the lock must not wait for IO:\nmemalloc_noio_save(), as in add_disk_fwnode().","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:18:23","updated_at":"2026-12-01 06:17:35"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"9.8","severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"9.8","severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":9.8,"baseSeverity":"CRITICAL","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/e7e089b61901be0f4bac6b1d8c8f8e25cf178280","name":"https://git.kernel.org/stable/c/e7e089b61901be0f4bac6b1d8c8f8e25cf178280","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/4fcc499ea9bc31b02393904a1903e794d146f5f7","name":"https://git.kernel.org/stable/c/4fcc499ea9bc31b02393904a1903e794d146f5f7","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/515e211124113b4faecf3b0cb20087965286ee0c","name":"https://git.kernel.org/stable/c/515e211124113b4faecf3b0cb20087965286ee0c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139120","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139120","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 868f2f0b72068a097508b6e8870a8950fd8eb7ef e7e089b61901be0f4bac6b1d8c8f8e25cf178280 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 868f2f0b72068a097508b6e8870a8950fd8eb7ef 515e211124113b4faecf3b0cb20087965286ee0c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 868f2f0b72068a097508b6e8870a8950fd8eb7ef 4fcc499ea9bc31b02393904a1903e794d146f5f7 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.6","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.6 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["block/blk-mq.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"e7e089b61901be0f4bac6b1d8c8f8e25cf178280","status":"affected","version":"868f2f0b72068a097508b6e8870a8950fd8eb7ef","versionType":"git"},{"lessThan":"515e211124113b4faecf3b0cb20087965286ee0c","status":"affected","version":"868f2f0b72068a097508b6e8870a8950fd8eb7ef","versionType":"git"},{"lessThan":"4fcc499ea9bc31b02393904a1903e794d146f5f7","status":"affected","version":"868f2f0b72068a097508b6e8870a8950fd8eb7ef","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["block/blk-mq.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.6"},{"lessThan":"4.6","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"4.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"4.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"4.6","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nblk-mq: set up a queue under tag_list_lock\n\nblk_mq_init_allocated_queue() only takes tag_list_lock at the end, when\nit adds the queue to the set. Before that it sizes the queue by\nset->nr_hw_queues, hands out set->tags[], maps by set->map[], and\nblk_mq_map_swqueue() frees tags of the set. An update clearing the maps\nat that time makes the new queue free tags that all the other queues\nshare. An NVMe controller reset during a namespace scan does exactly\nthat.\n\nTake the lock before the first look at the set. An update can be part of\nerror handling, so the allocations under the lock must not wait for IO:\nmemalloc_noio_save(), as in add_disk_fwnode()."}],"metrics":[{"cvssV3_1":{"baseScore":9.8,"baseSeverity":"CRITICAL","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"scenarios":[{"lang":"en","value":"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.\nAC: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.\nPR: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.\nUI: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.\nS: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.\nC: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.\nI: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.\nA: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."}]}],"providerMetadata":{"dateUpdated":"2026-12-01T05:41:19.820Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/e7e089b61901be0f4bac6b1d8c8f8e25cf178280"},{"url":"https://git.kernel.org/stable/c/515e211124113b4faecf3b0cb20087965286ee0c"},{"url":"https://git.kernel.org/stable/c/4fcc499ea9bc31b02393904a1903e794d146f5f7"}],"title":"blk-mq: set up a queue under tag_list_lock","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139120","datePublished":"2026-11-30T13:31:46.018Z","dateReserved":"2026-11-30T13:22:15.915Z","dateUpdated":"2026-12-01T05:41:19.820Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:18:23","lastModifiedDate":"2026-12-01 06:17:35","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":3.9,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139120","Ordinal":"1","Title":"blk-mq: set up a queue under tag_list_lock","CVE":"CVE-2026-139120","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139120","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nblk-mq: set up a queue under tag_list_lock\n\nblk_mq_init_allocated_queue() only takes tag_list_lock at the end, when\nit adds the queue to the set. Before that it sizes the queue by\nset->nr_hw_queues, hands out set->tags[], maps by set->map[], and\nblk_mq_map_swqueue() frees tags of the set. An update clearing the maps\nat that time makes the new queue free tags that all the other queues\nshare. An NVMe controller reset during a namespace scan does exactly\nthat.\n\nTake the lock before the first look at the set. An update can be part of\nerror handling, so the allocations under the lock must not wait for IO:\nmemalloc_noio_save(), as in add_disk_fwnode().","Type":"Description","Title":"blk-mq: set up a queue under tag_list_lock"}]}}}