CVE-2026-139435

block: unpin all pages of a bvec in bio_iov_iter_align_down()

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

block: unpin all pages of a bvec in bio_iov_iter_align_down()

bio_iov_iter_align_down() drops trailing bvecs with unpin_user_page(),
but a bvec built by iov_iter_extract_bvecs() can span several pages of
one folio, each with its own pin. All but the first pin leak.

The partially trimmed bvec has the same problem. Shrinking bv_len does
not release the pins for the pages cut off by the trim, and
__bio_release_pages() only unpins the pages bv_len still covers at
completion.

Both issues occur only with a logical block size above PAGE_SIZE and a
large folio backing the user buffer. On a device with a 64K logical
block size, an O_DIRECT pwritev() from a hugetlb mapping that ends 16K
past a block boundary leaks one huge page per call, whether the
remainder is its own bvec or the tail of a larger one.

Unpin all pages of a dropped bvec with bvec_unpin(), and unpin the
pages trimmed off the last bvec as well. Move bvec_unpin() up and split
its page count into a helper so both sites share it.

Analysis

AI-generated

Technical impact

In the Linux kernel, a flaw in the bio_iov_iter_align_down() routine causes certain page pins to remain held when a bvec is dropped or trimmed. When an I/O request uses O_DIRECT with a huge page mapping that crosses a large logical block boundary, one or more page pins are never released, leaking a reference that prevents the page from being reused. The leaked pins accumulate with each write and can exhaust available pin‑controlled memory, leading to degraded I/O performance, potential out‑of‑memory conditions, or kernel stalls. This represents a resource management weakness (CWE‑400).

Affected Systems

The vulnerability exists in all Linux kernel versions that contain the buggy implementation of bio_iov_iter_align_down() before the commit that fixes the bug. It is triggered only when the logical block size is above PAGE_SIZE and a large folio backs the user buffer—common on systems using 64K block devices with huge page mappings. Any host running such a kernel and performing O_DIRECT write operations to a block device with a large logical block size is potentially affected.

Risk and Exploitability

Although the EPSS score is unavailable and the vulnerability is not listed in CISA’s KEV catalog, the severity is high because the bug enables uncontrolled resource consumption that a local attacker with write access to a block device can exploit. The attack vector is a user‑space application that performs O_DIRECT pwritev() calls to a block device, causing repeated leaks of page pins. Because the kernel maintains reference counts for pages, the leak is hard to detect without monitoring, and recovery would require kernel updates or process restarts.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a release that includes the fix for bio_iov_iter_align_down().
  • If an immediate kernel upgrade is not possible, disable or avoid O_DIRECT pwritev() operations that use huge page mappings crossing large logical block boundaries on affected storage devices.
  • Monitor page pin usage (e.g., via /proc/meminfo or performance tools) to detect abnormal accumulation of pin references and plan a system reboot or process restart if thresholds are exceeded.

Generated by OpenCVE AI on November 30, 2026 at 22:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-400
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: block: unpin all pages of a bvec in bio_iov_iter_align_down() bio_iov_iter_align_down() drops trailing bvecs with unpin_user_page(), but a bvec built by iov_iter_extract_bvecs() can span several pages of one folio, each with its own pin. All but the first pin leak. The partially trimmed bvec has the same problem. Shrinking bv_len does not release the pins for the pages cut off by the trim, and __bio_release_pages() only unpins the pages bv_len still covers at completion. Both issues occur only with a logical block size above PAGE_SIZE and a large folio backing the user buffer. On a device with a 64K logical block size, an O_DIRECT pwritev() from a hugetlb mapping that ends 16K past a block boundary leaks one huge page per call, whether the remainder is its own bvec or the tail of a larger one. Unpin all pages of a dropped bvec with bvec_unpin(), and unpin the pages trimmed off the last bvec as well. Move bvec_unpin() up and split its page count into a helper so both sites share it.
Title block: unpin all pages of a bvec in bio_iov_iter_align_down()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:34 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM