xen-pciback: limit guest control of command register
authorJan Beulich <JBeulich@suse.com>
Wed, 11 Mar 2015 13:51:17 +0000 (13:51 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 9 May 2015 22:16:29 +0000 (23:16 +0100)
commit6dc77dfffb8317d01fc9c2d25d0288c7b31b8623
treed4c53e8da7e150e0a8b2e25c1b111207b326cb9e
parent48e1bc01b1b8f173586ae46f3e94de8d4aca89d9
xen-pciback: limit guest control of command register

commit af6fc858a35b90e89ea7a7ee58e66628c55c776b upstream.

Otherwise the guest can abuse that control to cause e.g. PCIe
Unsupported Request responses by disabling memory and/or I/O decoding
and subsequently causing (CPU side) accesses to the respective address
ranges, which (depending on system configuration) may be fatal to the
host.

Note that to alter any of the bits collected together as
PCI_COMMAND_GUEST permissive mode is now required to be enabled
globally or on the specific device.

This is CVE-2015-2150 / XSA-120.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
[bwh: Backported to 3.2: also change type of permissive from int to bool]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/xen/xen-pciback/conf_space.c
drivers/xen/xen-pciback/conf_space.h
drivers/xen/xen-pciback/conf_space_header.c