]> xenbits.xensource.com Git - xen.git/commit
x86/HVM: prefill partially used variable on emulation paths
authorJan Beulich <jbeulich@suse.com>
Thu, 12 Oct 2017 12:43:26 +0000 (14:43 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 12 Oct 2017 12:43:26 +0000 (14:43 +0200)
commit0d4732ac29b63063764c29fa3bd8946daf67d6f3
treedd53f11c81479b29f77f59884661cc83323bec12
parentd59e55b018cfb79d0c4f794041aff4fe1cd0d570
x86/HVM: prefill partially used variable on emulation paths

Certain handlers ignore the access size (vioapic_write() being the
example this was found with), perhaps leading to subsequent reads
seeing data that wasn't actually written by the guest. For
consistency and extra safety also do this on the read path of
hvm_process_io_intercept(), even if this doesn't directly affect what
guests get to see, as we've supposedly already dealt with read handlers
leaving data completely unitialized.

This is XSA-239.

Reported-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/emulate.c
xen/arch/x86/hvm/intercept.c