CVE-2026-64283: KVM: guest_memfd: Treat memslot binding offset+size as unsigned values

Published Jul 25, 2026
·
Updated

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

KVM: guestmemfd: Treat memslot binding offset+size as unsigned values

When binding a memslot to a guestmemfd file, treat the offset and size as unsigned values to fix a bug where the sum of the two can result in a false negative when checking for overflow against the size of the file. Passing unsigned values also avoids relying on somewhat obscure checks in other flows for safety, and tracks the offset and size as they are intended to be tracked, as unsigned values.

On 64-bit kernels, the number of pages a memslot contains and thus the size (and offset) of its guestmemfd binding are unsigned 64-bit values. Taking the offset+size as an lofft instead of a uofft inadvertently converts the unsigned value to a signed value if the offset and/or size is massive.

Locally storing the offset and size as signed values is benign in and of itself (though even that is extremely difficult to discern), but operating on their sum is not.

For the offset, KVM explicitly checks against a negative value, which might seem like a bug as KVM could incorrectly reject a legitimate binding, but that's not actually the case as KVMCREATEGUESTMEMFD takes a signed value for its size, i.e. a would-be-negative offset is also greater than the maximum possible size of any guestmemfd file.

Regarding the size, while KVM lacks an explicit check for a negative value, i.e. seemingly has a flawed overflow check, KVM restricts the number of pages in a single memslot to the largest positive signed 32-bit value:

if (id < KVMUSERMEMSLOTS && (mem->memorysize >> PAGESHIFT) > KVMMEMMAXNRPAGES) return -EINVAL;

and so that maximum "size" will ever be is 0x7fffffff000.

The sum of the two is, however, problematic. While the size is restricted by KVM's memslot logic, the offset is not, i.e. the offset is completely unchecked until the "offset + size > isizeread(inode)" check. If the offset is the (nearly) largest possible positive value, then adding size to the offset can result in a signed, negative 64-bit value. When compared against the size of the file (guaranteed to be positive), the negative sum is always smaller, and KVM incorrectly allows the absurd offset.

Opportunistically add missing includes in kvmmm.h (instead of relying on its parents).

Affected Software

2 affected components
Linux Linux kernel
Linux Linux kernel>=6.8<7.1.4

Event History

Jul 25, 2026
CVE Published
via MITRE·08:49 AM
Data Sourced
via MITRE·08:49 AM
Description
Data Sourced
via NVD·10:17 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What access and conditions are required to exploit this issue?

The CVSS vector indicates local access, low privileges, no user interaction, and high attack complexity. Exploitation involves binding a KVM memslot to a guest_memfd using massive offset and/or size values that trigger signed conversion and overflow-check problems.

2

Which systems are most relevant to triage?

The issue is in Linux kernel KVM guest_memfd memslot binding handling. The description specifically identifies 64-bit kernels, where memslot page counts and guest_memfd binding offsets and sizes are unsigned 64-bit values.

3

What should be done if this affects a system?

Apply the available patch. The fix treats the memslot binding offset and size as unsigned values so that their sum is checked correctly for overflow against the guest_memfd file size.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203