{"id":"CVE-2026-139126","state":"PUBLISHED","title":"blk-mq: don't trust the cookie in blk_mq_poll()","description":"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.","publishedAt":"2026-11-30T13:31:49.271Z","updatedAt":"2026-11-30T13:31:49.271Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3e08773c3841e9db7a520908cc2b136a77d275ff","status":"affected","lessThan":"e40dc9c454ef3fc136e2de2e69f365cc570bd7a6","versionType":"git"},{"version":"3e08773c3841e9db7a520908cc2b136a77d275ff","status":"affected","lessThan":"7394fa1f5cba107a5b921e0b359af660a212bf7f","versionType":"git"},{"version":"3e08773c3841e9db7a520908cc2b136a77d275ff","status":"affected","lessThan":"f6d85fc206d58ac6d91e73e865329124ba57be60","versionType":"git"},{"version":"3e08773c3841e9db7a520908cc2b136a77d275ff","status":"affected","lessThan":"24974185999fd80b676fbe2a6c7a97bbd38aaf3a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/blk-mq.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/blk-mq.c"]}],"references":["https://git.kernel.org/stable/c/e40dc9c454ef3fc136e2de2e69f365cc570bd7a6","https://git.kernel.org/stable/c/7394fa1f5cba107a5b921e0b359af660a212bf7f","https://git.kernel.org/stable/c/f6d85fc206d58ac6d91e73e865329124ba57be60","https://git.kernel.org/stable/c/24974185999fd80b676fbe2a6c7a97bbd38aaf3a"],"weaknesses":[],"ingestedAt":"2026-11-30T13:42:04.437Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139126.json","commit":"5317bbbde1916a58cb1fadabb726eb126daf44c1","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139126","state":"PUBLISHED","datePublished":"2026-11-30T13:31:49.271Z","dateUpdated":"2026-11-30T13:31:49.271Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.915Z"},"containers":{"cna":{"title":"blk-mq: don't trust the cookie in blk_mq_poll()","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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3e08773c3841e9db7a520908cc2b136a77d275ff","status":"affected","lessThan":"e40dc9c454ef3fc136e2de2e69f365cc570bd7a6","versionType":"git"},{"version":"3e08773c3841e9db7a520908cc2b136a77d275ff","status":"affected","lessThan":"7394fa1f5cba107a5b921e0b359af660a212bf7f","versionType":"git"},{"version":"3e08773c3841e9db7a520908cc2b136a77d275ff","status":"affected","lessThan":"f6d85fc206d58ac6d91e73e865329124ba57be60","versionType":"git"},{"version":"3e08773c3841e9db7a520908cc2b136a77d275ff","status":"affected","lessThan":"24974185999fd80b676fbe2a6c7a97bbd38aaf3a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/blk-mq.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/blk-mq.c"]}],"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"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:31:49.271Z"},"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"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}