]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: x86: Disallow hypercalls for guest callers in rings > 0
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 3 Aug 2009 16:43:28 +0000 (18:43 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Sep 2009 15:44:07 +0000 (08:44 -0700)
commitbe45e259c6948bed4482d9b9de32236078db2443
treebb1d0dcfd238008a22d334b916a90948528d7d67
parent6aece86ef27f5713f7a34a3e4c844ad0ba29fbae
KVM: x86: Disallow hypercalls for guest callers in rings > 0

commit 07708c4af1346ab1521b26a202f438366b7bcffd upstream.

So far unprivileged guest callers running in ring 3 can issue, e.g., MMU
hypercalls. Normally, such callers cannot provide any hand-crafted MMU
command structure as it has to be passed by its physical address, but
they can still crash the guest kernel by passing random addresses.

To close the hole, this patch considers hypercalls valid only if issued
from guest ring 0. This may still be relaxed on a per-hypercall base in
the future once required.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/x86.c
include/linux/kvm_para.h