8292994238
logging upon guest changing callback method (XSA-169) 5677f350-x86-make-debug-output-consistent-in-hvm_set_callback_via.patch - bsc#959387 - VUL-0: CVE-2015-8568 CVE-2015-8567: xen: qemu: net: vmxnet3: host memory leakage CVE-2015-8568-qemuu-net-vmxnet3-avoid-memory-leakage-in-activate_device.patch - bsc#957988 - VUL-0: CVE-2015-8550: xen: paravirtualized drivers incautious about shared memory contents (XSA-155) xsa155-xen-0001-xen-Add-RING_COPY_REQUEST.patch xsa155-xen-0002-blktap2-Use-RING_COPY_REQUEST.patch xsa155-xen-0003-libvchan-Read-prod-cons-only-once.patch xsa155-qemuu-qdisk-double-access.patch xsa155-qemut-qdisk-double-access.patch xsa155-qemuu-xenfb.patch xsa155-qemut-xenfb.patch - bsc#959006 - VUL-0: CVE-2015-8558: xen: qemu: usb: infinite loop in ehci_advance_state results in DoS CVE-2015-8558-qemuu-usb-infinite-loop-in-ehci_advance_state-results-in-DoS.patch - bsc#958918 - VUL-0: CVE-2015-7549: xen: qemu pci: null pointer dereference issue CVE-2015-7549-qemuu-pci-null-pointer-dereference-issue.patch - bsc#958493 - VUL-0: CVE-2015-8504: xen: qemu: ui: vnc: avoid floating point exception CVE-2015-8504-qemuu-vnc-avoid-floating-point-exception.patch CVE-2015-8504-qemut-vnc-avoid-floating-point-exception.patch - bsc#958007 - VUL-0: CVE-2015-8554: xen: qemu-dm buffer overrun in MSI-X handling (XSA-164) xsa164.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=393
49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
x86/HVM: avoid reading ioreq state more than once
|
|
|
|
Otherwise, especially when the compiler chooses to translate the
|
|
switch() to a jump table, unpredictable behavior (and in the jump table
|
|
case arbitrary code execution) can result.
|
|
|
|
This is XSA-166.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Acked-by: Ian Campbell <ian.campbell@citrix.com>
|
|
|
|
Index: xen-4.6.0-testing/xen/arch/x86/hvm/hvm.c
|
|
===================================================================
|
|
--- xen-4.6.0-testing.orig/xen/arch/x86/hvm/hvm.c
|
|
+++ xen-4.6.0-testing/xen/arch/x86/hvm/hvm.c
|
|
@@ -448,7 +448,10 @@ static bool_t hvm_wait_for_io(struct hvm
|
|
{
|
|
while ( sv->pending )
|
|
{
|
|
- switch ( p->state )
|
|
+ unsigned int state = p->state;
|
|
+
|
|
+ rmb();
|
|
+ switch ( state )
|
|
{
|
|
case STATE_IOREQ_NONE:
|
|
/*
|
|
@@ -459,18 +462,15 @@ static bool_t hvm_wait_for_io(struct hvm
|
|
hvm_io_assist(sv, ~0ul);
|
|
break;
|
|
case STATE_IORESP_READY: /* IORESP_READY -> NONE */
|
|
- rmb(); /* see IORESP_READY /then/ read contents of ioreq */
|
|
p->state = STATE_IOREQ_NONE;
|
|
hvm_io_assist(sv, p->data);
|
|
break;
|
|
case STATE_IOREQ_READY: /* IOREQ_{READY,INPROCESS} -> IORESP_READY */
|
|
case STATE_IOREQ_INPROCESS:
|
|
- wait_on_xen_event_channel(sv->ioreq_evtchn,
|
|
- (p->state != STATE_IOREQ_READY) &&
|
|
- (p->state != STATE_IOREQ_INPROCESS));
|
|
+ wait_on_xen_event_channel(sv->ioreq_evtchn, p->state != state);
|
|
break;
|
|
default:
|
|
- gdprintk(XENLOG_ERR, "Weird HVM iorequest state %d.\n", p->state);
|
|
+ gdprintk(XENLOG_ERR, "Weird HVM iorequest state %u\n", state);
|
|
sv->pending = 0;
|
|
domain_crash(sv->vcpu->domain);
|
|
return 0; /* bail */
|