x86/hvm: add stricter permissions checks to ioreq server control plane
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 20 Mar 2018 18:05:25 +0000 (18:05 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 21 Mar 2018 18:24:50 +0000 (18:24 +0000)
commit8df3821c08d024684a6c83659d8d794b565067f9
tree6444dfd0243ced9648400a5d5630f78c5229022f
parent603c24dcfff36cbd9fee6a7dab0160eac5753b08
x86/hvm: add stricter permissions checks to ioreq server control plane

There has always been an intention in the ioreq server API that only the
domain that creates an ioreq server should be able to manipulate it.
However, so far, nothing has enforced this. This means that two domains
with DM_PRIV over a target domain can currently manipulate each others
ioreq servers.

A previous patch added code to take a reference and store a pointer to the
domain that creates an ioreq server. This patch now adds checks to the
functions that manipulate the ioreq server to make sure they are being
called by the same domain.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/ioreq.c