All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] KVM: fixes for the kernel-hardening tree
@ 2017-10-26 13:45 ` Paolo Bonzini
  0 siblings, 0 replies; 24+ messages in thread
From: Paolo Bonzini @ 2017-10-26 13:45 UTC (permalink / raw)
  To: linux-kernel, kvm
  Cc: Christoffer Dall, Marc Zyngier, Christian Borntraeger,
	Cornelia Huck, James Hogan, Paul Mackerras, kernel-hardening,
	Kees Cook, Radim Krčmář

Four KVM ioctls (KVM_GET/SET_CPUID2 on x86, KVM_GET/SET_ONE_REG on
ARM and s390) directly access the kvm_vcpu_arch struct.  Therefore, the
new usercopy hardening work in linux-next, which forbids copies from and
to slab objects unless they are from kmalloc or explicitly whitelisted,
breaks KVM on those architectures.

The kvm_vcpu_arch struct is embedded in the kvm_vcpu struct and the
corresponding slab cache is allocated by architecture-independent code.
It is enough, for simplicity, to whitelist the whole sub-struct and
only touch one place of the KVM code.  Later, any further restrictions
can be applied in the KVM tree.

Paolo Bonzini (2):
  kvm: whitelist struct kvm_vcpu_arch
  kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl

 arch/x86/kvm/x86.c  | 7 ++++---
 virt/kvm/kvm_main.c | 8 ++++++--
 2 files changed, 10 insertions(+), 5 deletions(-)

-- 
2.14.2

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2017-12-01  8:29 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-26 13:45 [PATCH v2 0/2] KVM: fixes for the kernel-hardening tree Paolo Bonzini
2017-10-26 13:45 ` [kernel-hardening] " Paolo Bonzini
2017-10-26 13:45 ` [PATCH 1/2] kvm: whitelist struct kvm_vcpu_arch Paolo Bonzini
2017-10-26 13:45   ` [kernel-hardening] " Paolo Bonzini
2017-10-26 14:13   ` Cornelia Huck
2017-10-26 14:13     ` [kernel-hardening] " Cornelia Huck
2017-10-26 14:21   ` Christoffer Dall
2017-10-26 14:21     ` [kernel-hardening] " Christoffer Dall
2017-10-26 14:34   ` Marc Zyngier
2017-10-26 14:34     ` [kernel-hardening] " Marc Zyngier
2017-10-26 14:51   ` Christian Borntraeger
2017-10-26 14:51     ` [kernel-hardening] " Christian Borntraeger
2017-10-30 23:28   ` [kernel-hardening] " Eric Biggers
2017-10-30 23:51     ` Kees Cook
2017-10-26 13:45 ` [PATCH 2/2] kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl Paolo Bonzini
2017-10-26 13:45   ` [kernel-hardening] " Paolo Bonzini
2017-10-26 13:48   ` Kees Cook
2017-10-26 13:48     ` [kernel-hardening] " Kees Cook
2017-11-30 20:40   ` Kees Cook
2017-11-30 20:40     ` [kernel-hardening] " Kees Cook
2017-12-01  8:29     ` Paolo Bonzini
2017-12-01  8:29       ` [kernel-hardening] " Paolo Bonzini
2017-10-27  5:25 ` [PATCH v2 0/2] KVM: fixes for the kernel-hardening tree Paul Mackerras
2017-10-27  5:25   ` [kernel-hardening] " Paul Mackerras

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.