x86: enforce proper privilege when (un)mapping pIRQ-s
authorJan Beulich <jbeulich@suse.com>
Thu, 12 Oct 2017 12:36:30 +0000 (14:36 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 12 Oct 2017 12:36:30 +0000 (14:36 +0200)
commitdb72faf69c94513e180568006a9d899ed422ff90
treeea389233b215365da9a74069ed78c143d5ba08a6
parent3308374b1be7d43e23bd2e9eaf23ec06d7959882
x86: enforce proper privilege when (un)mapping pIRQ-s

(Un)mapping of IRQs, just like other RESOURCE__ADD* / RESOURCE__REMOVE*
actions (in FLASK terms) should be XSM_DM_PRIV rather than XSM_TARGET.
This in turn requires bypassing the XSM check in physdev_unmap_pirq()
for the HVM emuirq case just like is being done in physdev_map_pirq().
The primary goal security wise, however, is to no longer allow HVM
guests, by specifying their own domain ID instead of DOMID_SELF, to
enter code paths intended for PV guest and the control domains of HVM
guests only.

This is part of XSA-237.

Reported-by: HW42 <hw42@ipsumj.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/x86/physdev.c
xen/include/xsm/dummy.h