]> xenbits.xensource.com Git - xen.git/commit
x86/HVM: confine internally handled MMIO to solitary regions
authorJan Beulich <jbeulich@suse.com>
Thu, 27 Nov 2014 13:18:14 +0000 (14:18 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 27 Nov 2014 13:18:14 +0000 (14:18 +0100)
commit3e5c06aeea1ff91c3f2247baae372936b67cf411
treefb4732953c5916f5bc4c0bb7d76f3653c7687a68
parent7d80d71da3369ddfed5ec4cb822194cfd0faf23e
x86/HVM: confine internally handled MMIO to solitary regions

While it is generally wrong to cross region boundaries when dealing
with MMIO accesses of repeated string instructions (currently only
MOVS) as that would do things a guest doesn't expect (leaving aside
that none of these regions would normally be accessed with repeated
string instructions in the first place), this is even more of a problem
for all virtual MSI-X page accesses (both msixtbl_{read,write}() can be
made dereference NULL "entry" pointers this way) as well as undersized
(1- or 2-byte) LAPIC writes (causing vlapic_read_aligned() to access
space beyond the one memory page set up for holding LAPIC register
values).

Since those functions validly assume to be called only with addresses
their respective checking functions indicated to be okay, it is generic
code that needs to be fixed to clip the repetition count.

To be on the safe side (and consistent), also do the same for buffered
I/O intercepts, even if their only client (stdvga) doesn't put the
hypervisor at risk (i.e. "only" guest misbehavior would result).

This is CVE-2014-8867 / XSA-112.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/hvm/intercept.c
xen/arch/x86/hvm/vmsi.c