{"id":"CVE-2026-139435","state":"PUBLISHED","title":"block: unpin all pages of a bvec in bio_iov_iter_align_down()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nblock: unpin all pages of a bvec in bio_iov_iter_align_down()\n\nbio_iov_iter_align_down() drops trailing bvecs with unpin_user_page(),\nbut a bvec built by iov_iter_extract_bvecs() can span several pages of\none folio, each with its own pin. All but the first pin leak.\n\nThe partially trimmed bvec has the same problem. Shrinking bv_len does\nnot release the pins for the pages cut off by the trim, and\n__bio_release_pages() only unpins the pages bv_len still covers at\ncompletion.\n\nBoth issues occur only with a logical block size above PAGE_SIZE and a\nlarge folio backing the user buffer. On a device with a 64K logical\nblock size, an O_DIRECT pwritev() from a hugetlb mapping that ends 16K\npast a block boundary leaks one huge page per call, whether the\nremainder is its own bvec or the tail of a larger one.\n\nUnpin all pages of a dropped bvec with bvec_unpin(), and unpin the\npages trimmed off the last bvec as well. Move bvec_unpin() up and split\nits page count into a helper so both sites share it.","publishedAt":"2026-11-30T13:34:43.828Z","updatedAt":"2026-11-30T13:34:43.828Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"20a0e6276edba4318c13486df02c31e5f3c09431","status":"affected","lessThan":"2bfdba4243ac5483619d871fee9a2b821f5c7231","versionType":"git"},{"version":"20a0e6276edba4318c13486df02c31e5f3c09431","status":"affected","lessThan":"b91a661514f3a3ce5add42fc1f2eb17b61eacaca","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/bio.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"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/bio.c"]}],"references":["https://git.kernel.org/stable/c/2bfdba4243ac5483619d871fee9a2b821f5c7231","https://git.kernel.org/stable/c/b91a661514f3a3ce5add42fc1f2eb17b61eacaca"],"weaknesses":[],"ingestedAt":"2026-11-30T13:50:04.417Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139435.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139435","state":"PUBLISHED","datePublished":"2026-11-30T13:34:43.828Z","dateUpdated":"2026-11-30T13:34:43.828Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.933Z"},"containers":{"cna":{"title":"block: unpin all pages of a bvec in bio_iov_iter_align_down()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nblock: unpin all pages of a bvec in bio_iov_iter_align_down()\n\nbio_iov_iter_align_down() drops trailing bvecs with unpin_user_page(),\nbut a bvec built by iov_iter_extract_bvecs() can span several pages of\none folio, each with its own pin. All but the first pin leak.\n\nThe partially trimmed bvec has the same problem. Shrinking bv_len does\nnot release the pins for the pages cut off by the trim, and\n__bio_release_pages() only unpins the pages bv_len still covers at\ncompletion.\n\nBoth issues occur only with a logical block size above PAGE_SIZE and a\nlarge folio backing the user buffer. On a device with a 64K logical\nblock size, an O_DIRECT pwritev() from a hugetlb mapping that ends 16K\npast a block boundary leaks one huge page per call, whether the\nremainder is its own bvec or the tail of a larger one.\n\nUnpin all pages of a dropped bvec with bvec_unpin(), and unpin the\npages trimmed off the last bvec as well. Move bvec_unpin() up and split\nits page count into a helper so both sites share it."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"20a0e6276edba4318c13486df02c31e5f3c09431","status":"affected","lessThan":"2bfdba4243ac5483619d871fee9a2b821f5c7231","versionType":"git"},{"version":"20a0e6276edba4318c13486df02c31e5f3c09431","status":"affected","lessThan":"b91a661514f3a3ce5add42fc1f2eb17b61eacaca","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/bio.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"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/bio.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/2bfdba4243ac5483619d871fee9a2b821f5c7231"},{"url":"https://git.kernel.org/stable/c/b91a661514f3a3ce5add42fc1f2eb17b61eacaca"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:34:43.828Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.18","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}