android_kernel_oneplus_msm8998/virt/kvm
Sean Christopherson 9aacea736c KVM: Reject device ioctls from processes other than the VM's creator
commit ddba91801aeb5c160b660caed1800eb3aef403f8 upstream.

KVM's API requires thats ioctls must be issued from the same process
that created the VM.  In other words, userspace can play games with a
VM's file descriptors, e.g. fork(), SCM_RIGHTS, etc..., but only the
creator can do anything useful.  Explicitly reject device ioctls that
are issued by a process other than the VM's creator, and update KVM's
API documentation to extend its requirements to device ioctls.

Fixes: 852b6d57dc ("kvm: add device control API")
Cc: <stable@vger.kernel.org>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03 06:23:28 +02:00
..
arm KVM: arm/arm64: Fix MMIO emulation data handling 2019-03-23 08:44:20 +01:00
async_pf.c mm: replace get_user_pages_unlocked() write/force parameters with gup_flags 2018-12-17 21:55:16 +01:00
async_pf.h
coalesced_mmio.c
coalesced_mmio.h KVM: make the declaration of functions within 80 characters 2015-09-14 18:43:19 +02:00
eventfd.c KVM: irqfd: fix race between EPOLLHUP and irq_bypass_register_consumer 2018-08-24 13:27:00 +02:00
irqchip.c KVM: irqfd: fix NULL pointer dereference in kvm_irq_map_gsi 2016-06-24 10:18:18 -07:00
Kconfig KVM: don't pointlessly leave KVM_COMPAT=y in non-KVM configs 2015-11-04 16:24:30 +01:00
kvm_main.c KVM: Reject device ioctls from processes other than the VM's creator 2019-04-03 06:23:28 +02:00
vfio.c vfio: New external user group/file match 2017-07-27 15:06:07 -07:00
vfio.h