Re: [PATCH v2] KVM: coalesced_mmio: reject zone sizes that don't fit in an int
From: Sean Christopherson
Date: Fri Nov 13 2026 - 11:22:28 EST
On Wed, 28 Oct 2026 09:59:56 +0800, Hang Nan wrote:
> kvm_vm_ioctl_register_coalesced_mmio() validates @zone->pio but not
> @zone->size. The u32 size is handed to kvm_io_bus_register_dev() as an
> "int len", so any size >= 0x80000000 silently becomes negative.
>
> coalesced_mmio_in_range() bails out immediately for len < 0, so such a
> zone never matches its own range:
>
> [...]
Applied to kvm-x86 generic, thanks!
[1/1] KVM: coalesced_mmio: reject zone sizes that don't fit in an int
https://github.com/kvm-x86/linux/commit/9afe49408a4e
--
https://github.com/kvm-x86/linux/tree/next