Description
In the Linux kernel, the following vulnerability has been resolved:

io_uring/rsrc: fix folio size overflow in io_vec_fill_bvec()

io_vec_fill_bvec() computes the folio size with a plain int 1:

unsigned long folio_size = 1 << imu->folio_shift;

imu->folio_shift is unsigned int and comes from folio_shift() of the
folio backing the registered buffer, so it can be 32 or more on a 64 bit
kernel. Shifting int 1 that far is undefined, and on x86 and arm64 the
count is taken modulo 32, so a shift of 34 yields 4 rather than 16G.
Every other folio_shift shift in this file already uses 1UL.

The result is that the segment estimate and the fill loop disagree.
io_estimate_bvec_size() sizes the bvec array with the real shift:

max_segs += (iov[i].iov_len >> shift) + 2;

so a 1M iovec on a 16G folio is charged 2 segments, while
io_vec_fill_bvec() then walks the same iovec in folio_size chunks of 4
bytes and writes res_bvec[bvec_idx] a quarter of a million times, past
the end of the array it was given. src_bvec is advanced once per
iteration as well, so imu->bvec is read past its end at the same time.
validate_fixed_range() only checks that the range is inside the
registered buffer and does not bound the segment count.

Reaching it needs a folio with a shift of at least 32, which means a
gigantic hugetlb page: 16G on arm64 with 64K pages, where
CONT_PMD_SHIFT is 34 and hugetlb_add_hstate(CONT_PMD_SHIFT - PAGE_SHIFT)
registers that size, and likewise on powerpc. x86_64 tops out at 1G, so
a shift of 30, which still fits in int and is unaffected.

Use 1UL, as the rest of the file does.
Published: 2026-09-04
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A flaw in the Linux kernel io_uring subsystem causes an overflow when calculating the size of a folio backing a registered buffer. The routine uses a signed int shift (1 << imu->folio_shift) that becomes undefined for shifts of 32 or more. On architectures that support hugepages larger than 1 GB, this can produce a erroneously small folio size and cause the code to write far beyond the bounds of the supplied bvec array, corrupting kernel memory. This corruption could allow an attacker with the ability to trigger the write to gain arbitrary kernel execution.

Affected Systems

All Linux kernel builds that include the unpatched io_uring implementation are affected. The issue exists in any version before commit c/3267d7c8ba51642117f7bdd1ece02b2540668476 and its subsequent integration commits. Distributions shipping those kernel versions on architectures that support hugepages larger than 1 GB (such as 64‑bit ARM and PowerPC) are susceptible. Standard x86_64 kernels are not affected because the maximum folio shift on that platform is 30.

Risk and Exploitability

The vulnerability is not listed in CISA’s KEV catalog and its EPSS score is not available. The CVSS score is not provided, making it difficult to gauge precise severity. The overflow requires the creation of a hugepage buffer with a shift of at least 32, so an attacker would need privileged access or the ability to allocate large hugetlb pages. A successful exploit could result in kernel memory corruption and potential privilege escalation. The risk is moderate to high for affected systems that expose the vulnerable API to privileged or untrusted processes.

Generated by OpenCVE AI on September 4, 2026 at 18:26 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to the patched release that includes the commit correcting the folio size calculation.
  • If an immediate kernel update is not feasible, restrict or disable the registration of hugepages larger than 1 GB, or prevent untrusted code from allocating such buffers.
  • Enable kernel address space layout randomization and other memory protection features to reduce the impact if a failure occurs.

Generated by OpenCVE AI on September 4, 2026 at 18:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Sep 2026 18:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-120
CWE-680

Fri, 04 Sep 2026 15:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: io_uring/rsrc: fix folio size overflow in io_vec_fill_bvec() io_vec_fill_bvec() computes the folio size with a plain int 1: unsigned long folio_size = 1 << imu->folio_shift; imu->folio_shift is unsigned int and comes from folio_shift() of the folio backing the registered buffer, so it can be 32 or more on a 64 bit kernel. Shifting int 1 that far is undefined, and on x86 and arm64 the count is taken modulo 32, so a shift of 34 yields 4 rather than 16G. Every other folio_shift shift in this file already uses 1UL. The result is that the segment estimate and the fill loop disagree. io_estimate_bvec_size() sizes the bvec array with the real shift: max_segs += (iov[i].iov_len >> shift) + 2; so a 1M iovec on a 16G folio is charged 2 segments, while io_vec_fill_bvec() then walks the same iovec in folio_size chunks of 4 bytes and writes res_bvec[bvec_idx] a quarter of a million times, past the end of the array it was given. src_bvec is advanced once per iteration as well, so imu->bvec is read past its end at the same time. validate_fixed_range() only checks that the range is inside the registered buffer and does not bound the segment count. Reaching it needs a folio with a shift of at least 32, which means a gigantic hugetlb page: 16G on arm64 with 64K pages, where CONT_PMD_SHIFT is 34 and hugetlb_add_hstate(CONT_PMD_SHIFT - PAGE_SHIFT) registers that size, and likewise on powerpc. x86_64 tops out at 1G, so a shift of 30, which still fits in int and is unaffected. Use 1UL, as the rest of the file does.
Title io_uring/rsrc: fix folio size overflow in io_vec_fill_bvec()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-04T15:13:30.800Z

Reserved: 2026-08-26T14:34:25.794Z

Link: CVE-2026-80810

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-04T16:18:08.360

Modified: 2026-09-04T16:18:08.360

Link: CVE-2026-80810

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-04T18:30:04Z

Weaknesses
  • CWE-120

    Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

  • CWE-680

    Integer Overflow to Buffer Overflow