{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139126","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-11-30T13:22:15.915Z","datePublished":"2026-11-30T13:31:49.271Z","dateUpdated":"2026-12-01T05:41:25.795Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-12-01T05:41:25.795Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nblk-mq: don't trust the cookie in blk_mq_poll()\n\nblk_mq_poll() indexes queue_hw_ctx[] with bio->bi_cookie unchecked. Zone\nwrite plugging keeps the segment count of a plugged write in\n__bi_nr_segments, which shares a union with the cookie, and clears\nREQ_POLLED, but bio_poll() only looks at the cookie. A plugged polled\nwrite with more segments than there are hardware queues reads past the\narray. The bio is also SLAB_TYPESAFE_BY_RCU, so a cookie from a bio\nreused for another device can meet the wrong array as well.\n\nIgnore a cookie that is out of range or doesn't name a poll queue."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"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.\nAC:L - placeholder\nPR: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.\nUI: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.\nS: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.\nC: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.\nI: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.\nA: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."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/blk-mq.c"],"versions":[{"version":"3e08773c3841e9db7a520908cc2b136a77d275ff","lessThan":"e40dc9c454ef3fc136e2de2e69f365cc570bd7a6","status":"affected","versionType":"git"},{"version":"3e08773c3841e9db7a520908cc2b136a77d275ff","lessThan":"7394fa1f5cba107a5b921e0b359af660a212bf7f","status":"affected","versionType":"git"},{"version":"3e08773c3841e9db7a520908cc2b136a77d275ff","lessThan":"f6d85fc206d58ac6d91e73e865329124ba57be60","status":"affected","versionType":"git"},{"version":"3e08773c3841e9db7a520908cc2b136a77d275ff","lessThan":"24974185999fd80b676fbe2a6c7a97bbd38aaf3a","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/blk-mq.c"],"versions":[{"version":"5.16","status":"affected"},{"version":"0","lessThan":"5.16","status":"unaffected","versionType":"semver"},{"version":"6.12.120","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.65","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.3.6","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/e40dc9c454ef3fc136e2de2e69f365cc570bd7a6"},{"url":"https://git.kernel.org/stable/c/7394fa1f5cba107a5b921e0b359af660a212bf7f"},{"url":"https://git.kernel.org/stable/c/f6d85fc206d58ac6d91e73e865329124ba57be60"},{"url":"https://git.kernel.org/stable/c/24974185999fd80b676fbe2a6c7a97bbd38aaf3a"}],"title":"blk-mq: don't trust the cookie in blk_mq_poll()","x_generator":{"engine":"bippy-1.2.0"}}}}