Re: [PATCH v4 0/3] KVM: guest_memfd: Fix signed offset+size goof
From: Sean Christopherson
Date: Fri Jun 05 2026 - 14:41:26 EST
On Tue, 02 Jun 2026 10:09:18 -0700, Sean Christopherson wrote:
> Fix a bug where KVM fails to reject a comically large offset into guest_memfd
> if offset+size results in a signed, negative value. Add a testcase to prove
> the bug, and to serve as a regression test.
>
> Note, v1 and v2 was part of larger series.
>
> v4:
> - Collect tags. [Mike, Ackerley]
> - Use "INT64_MAX - page_size" instead of hardcoded literal. [Sashiko, Ackerley]
>
> [...]
Applied to kvm-x86 gmem, thanks!
[1/3] KVM: guest_memfd: Treat memslot binding offset+size as unsigned values
https://github.com/kvm-x86/linux/commit/eba85fee7fc6
[2/3] KVM: selftests: Expand the guest_memfd test macros to allow passing the VM
https://github.com/kvm-x86/linux/commit/b7a23fb0ed7e
[3/3] KVM: selftests: Add guest_memfd regression test signed offset+size bug
https://github.com/kvm-x86/linux/commit/b408b52e7111
--
https://github.com/kvm-x86/linux/tree/next