]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/xen: Validate port number in SCHEDOP_poll
authorDavid Woodhouse <dwmw@amazon.co.uk>
Sat, 12 Nov 2022 13:48:58 +0000 (13:48 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 23 Nov 2022 23:58:44 +0000 (18:58 -0500)
commit552f387e93a38c6954eed986f3c926843c911626
tree3f9d86b247a5c690bc218b6a24370320af7bdc57
parent982cd7b1ccbfd9f2b27d462a1513f2c3d72664c7
KVM: x86/xen: Validate port number in SCHEDOP_poll

We shouldn't allow guests to poll on arbitrary port numbers off the end
of the event channel table.

Fixes: 87cd5a9828f4 ("KVM: x86/xen: handle PV spinlocks slowpath")
[dwmw2: my bug though; the original version did check the validity as a
 side-effect of an idr_find() which I ripped out in refactoring.]
Reported-by: Michal Luczaj <mhal@rbox.co>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Cc: stable@kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/xen.c