Re: [PATCH] KVM: Mask off the address space ID in kvm_set_internal_memslot() check
From: Sean Christopherson
Date: Mon Sep 21 2026 - 10:46:29 EST
On Thu, 27 Aug 2026 19:22:00 +0800, Zeng Chi wrote:
> kvm_set_internal_memslot() is supposed to reject memslot IDs that belong
> to userspace, i.e. IDs below KVM_USER_MEM_SLOTS, but it compares the raw
> "slot" field, which packs both the address space ID and the memslot ID
> (as_id << 16 | id). For any address space other than 0, the packed value
> is always >= 65536, which is larger than KVM_USER_MEM_SLOTS, and so the
> sanity check is a nop regardless of the actual memslot ID.
>
> [...]
Applied to kvm-x86 misc, thanks!
[1/1] KVM: Mask off the address space ID in kvm_set_internal_memslot() check
https://github.com/kvm-x86/linux/commit/7d2a727f44d8
--
https://github.com/kvm-x86/linux/tree/next