CVE-2026-139126

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

Published Nov 30, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The flaw in the blk_mq_poll() helper causes the function to index the queue_hw_ctx array using the bio->bi_cookie field without validating that the cookie value is within bounds. Because the cookie shares a union with the number of segments a bio contains, a plugged polled write with an inflated segment count can produce a cookie value that points outside the array. Reading past the end of queue_hw_ctx can allow an attacker to read memory beyond the intended boundaries, potentially exposing kernel memory or leading to instability. The weakness is an unchecked pointer dereference associated with a buffer read out of bounds (CWE-125).

Affected Systems

This issue affects any Linux distribution that ships an unpatched kernel where the legacy blk‑mq implementation has not yet been modified to include the out‑of‑bounds check. The vulnerability is present in the core kernel code and does not involve any user‑space binary. All affected kernels are those that contain the version of blk_mq_poll() listed in the cited kernel revisions before the fix commit.

Risk and Exploitability

The EPSS score is < 1%, and this CVE is not listed in the CISA KEV catalog, indicating no evidence of widespread exploitation. Based on the description, it is inferred that the flaw can be triggered by manipulating the bio structure during a block I/O operation, which typically requires local access to the block device. An attacker with such capabilities could read kernel memory or destabilize the system, but no public exploits have been reported. The CVSS score of 7.8 indicates a high severity, so the risk is considered high until a patch is applied.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Install the latest Linux kernel that includes the out‑of‑bounds check in blk_mq_poll() (commit referenced in the advisory).
  • If a kernel upgrade is not possible immediately, restrict write access to block devices to privileged users only to reduce the chance that untrusted processes can craft a malicious bio with an out‑of‑range cookie.
  • Enable kernel log monitoring for unexpected blk_mq_poll errors or out‑of‑bounds read events that may indicate an exploitation attempt.

Generated by OpenCVE AI on December 2, 2026 at 11:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
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.
Title blk-mq: don't trust the cookie in blk_mq_poll()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Dec 1, 2026, 5:41 AM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Dec 1, 2026, 6:17 AM
Severity
Important
Public date
Nov 30, 2026, 1:31 PM