]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Reject device ioctls from processes other than the VM's creator
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 15 Feb 2019 20:48:39 +0000 (12:48 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 28 Mar 2019 16:27:06 +0000 (17:27 +0100)
commit8d7a1285d5710fb883ed0120ffa6d2291b10a5e9
tree9b22345e6485bab60e576c0f279d86975d349fcc
parent4080532c0c44d8c19b9376a9559fe9dee02eb748
KVM: Reject device ioctls from processes other than the VM's creator

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: 06c32cc5607e ("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>
Documentation/virtual/kvm/api.txt
virt/kvm/kvm_main.c