Skip to contentSkip to conversation

xen-pciback: limit guest control of command register

PATCH Applied Jan Beulich 2 participants 3 messages Mar 11, 2015 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 xen-pciback: limit guest control of command register

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.

---
 drivers/xen/xen-pciback/conf_space.c        |    2 
 drivers/xen/xen-pciback/conf_space.h        |    2 
 drivers/xen/xen-pciback/conf_space_header.c |   58 ++++++++++++++++++++++------
 3 files changed, 49 insertions(+), 13 deletions(-)
drivers/xen/xen-pciback/conf_space.c +1 -1
@@ -16,7 +16,7 @@
 #include "conf_space.h"
 #include "conf_space_quirks.h"
 
-static bool permissive;
+bool permissive;
 module_param(permissive, bool, 0644);
 
 /* This is where xen_pcibk_read_config_byte, xen_pcibk_read_config_word,
drivers/xen/xen-pciback/conf_space.h +2 -0
@@ -64,6 +64,8 @@ struct config_field_entry {
 	void *data;
 };
 
+extern bool permissive;
+
 #define OFFSET(cfg_entry) ((cfg_entry)->base_offset+(cfg_entry)->field->offset)
 
 /* Add fields to a device - the add_fields macro expects to get a pointer to
drivers/xen/xen-pciback/conf_space_header.c +47 -12

93 lines not on this page · raw message

Applied
#1 lore raw
Quoted 11 lines · Jan Beulich

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.

Applied to stable/for-linus-4.0 and tagged for stable, thanks.

David

Applied
#2 lore raw
In reply to Jan Beulich
Quoted 11 lines · Jan Beulich

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.

Applied to stable/for-linus-4.0 and tagged for stable, thanks.

David