CVE-2026-139126: blk-mq: don't trust the cookie in blk_mq_poll()
In the Linux kernel, the following vulnerability has been resolved:
blk-mq: don't trust the cookie in blkmqpoll()
blkmqpoll() indexes queuehwctx[] with bio->bicookie unchecked. Zone write plugging keeps the segment count of a plugged write in binrsegments, which shares a union with the cookie, and clears REQPOLLED, but biopoll() 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 SLABTYPESAFEBYRCU, 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
In blk_mq_poll(), ignore cookies that are out of range or do not identify a poll queue before indexing queue_hw_ctx[].
Event History
Frequently Asked Questions
What conditions are needed to trigger the out-of-bounds access?
A polled write must remain plugged and have more segments than the target device has hardware queues. In that state, the segment count can be interpreted as a polling cookie and used as an unchecked index into the hardware-queue array.
Can reused bios cause this issue across devices?
Yes. Because bios are allocated with SLAB_TYPESAFE_BY_RCU, a cookie from a bio reused for another device can be interpreted against the wrong device's hardware-queue array.
What validation does the fix add?
The fix ignores cookies that are outside the hardware-queue array range or that do not identify a polling queue.