Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-139126

published high CVSS 3.1 · 7.8

blk-mq: don't trust the cookie in blk_mq_poll()

Published
30 Nov 2026, 13:31:49 UTC
Updated
01 Dec 2026, 05:41:25 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux3e08773c3841e9db7a520908cc2b136a77d275ff to < e40dc9c454ef3fc136e2de2e69f365cc570bd7a6 · 3e08773c3841e9db7a520908cc2b136a77d275ff to < 7394fa1f5cba107a5b921e0b359af660a212bf7f · 3e08773c3841e9db7a520908cc2b136a77d275ff to < f6d85fc206d58ac6d91e73e865329124ba57be60 · 3e08773c3841e9db7a520908cc2b136a77d275ff to < 24974185999fd80b676fbe2a6c7a97bbd38aaf3a · Other versions: unaffected Affected Not stated Linux
Linux — Linux5.16 (affected) · 0 to < 5.16 (unaffected · semver) · 6.12.120 through 6.12.* (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

Description

In the Linux kernel, the following vulnerability has been resolved: blk-mq: don't trust the cookie in blk_mq_poll() blk_mq_poll() indexes queue_hw_ctx[] with bio->bi_cookie unchecked. Zone write plugging keeps the segment count of a plugged write in __bi_nr_segments, which shares a union with the cookie, and clears REQ_POLLED, but bio_poll() only looks at the cookie. A plugged polled write with more segments than there are hardware queues reads past the array. The bio is also SLAB_TYPESAFE_BY_RCU, so a cookie from a bio reused for another device can meet the wrong array as well. Ignore a cookie that is out of range or doesn't name a poll queue.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The trigger is a local io_uring IORING_SETUP_IOPOLL O_DIRECT write (block/fops.c __blkdev_direct_IO_async, or zonefs via iomap_dio_submit_bio). iocb_bio_iopoll() -> bio_poll() -> blk_mq_poll() is fed bi_cookie from the host's own bio, and no network peer supplies that value. AC:L - placeholder PR:L - The io_uring IOPOLL/IOCB_HIPRI write path has no capability check. The attacker needs only write access to sequential-zone files, such as zonefs files the admin assigns through s_uid/s_perm or chown, or an ACL on a raw zoned bdev. ublk, loop and nbd have no ->poll, so a user namespace cannot create a pollable queue. UI:N - The attacker submits the polled writes and reaps them with io_uring_enter(IORING_ENTER_GETEVENTS) on their own. Once a write is plugged, every iopoll pass calls blk_mq_poll() with cookie = nr_segs, so no other user has to act. S:U - The bogus hctx is used inside the kernel's own blk-mq and NVMe driver poll path. The impact stays within the host kernel's authority and crosses no hypervisor, IOMMU or sandbox boundary. C:H - On 7.0-7.3.5, q->queue_hw_ctx[cookie] reads past the kcalloc'd pointer array at an attacker-chosen index (nr_segs, up to max_segments) into neighbouring slab objects. That sprayable pointer becomes the hctx whose driver_data nvme_poll() parses as an nvme_queue, a type confusion usable for kernel reads. I:H - On the forged hctx, nvme_poll() takes nvmeq->cq_poll_lock, advances cq_head/cq_phase, writel()s the doorbell through nvmeq->q_db, and completes the request it looks up by tag (end_io callbacks). A sprayed fake nvme_queue therefore gives kernel writes and a path to control-flow hijack. A:H - Even without a spray, the bogus hctx is dereferenced by ->poll, for example hctx->driver_data in nvme_poll(). The hctx is a NULL slack slot on 7.x, or NULL from xa_load() on 5.18-6.18.64 and 6.12.y, so the result is a kernel oops the attacker can repeat at will.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 3e08773c3841e9db7a520908cc2b136a77d275ff to < e40dc9c454ef3fc136e2de2e69f365cc570bd7a6 (affected · git)3e08773c3841e9db7a520908cc2b136a77d275ff to < 7394fa1f5cba107a5b921e0b359af660a212bf7f (affected · git)3e08773c3841e9db7a520908cc2b136a77d275ff to < f6d85fc206d58ac6d91e73e865329124ba57be60 (affected · git)3e08773c3841e9db7a520908cc2b136a77d275ff to < 24974185999fd80b676fbe2a6c7a97bbd38aaf3a (affected · git)Default: unaffected Linux · cna
Linux Linux 5.16 (affected)0 to < 5.16 (unaffected · semver)6.12.120 through 6.12.* (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

0

No weakness assertions.

References

4

Provider assertions

1

Linux · cna

blk-mq: don't trust the cookie in blk_mq_poll()

Provenance

Schema
5.2
Searchable
yes
Content hash
67b77ffe0eef6851abb4f71bffb0d7f1061b750c1851179f4a47157318372f20
Ingested
01 Dec 2026, 05:47:22 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected