x86emul: always init mmval
authorJan Beulich <jbeulich@suse.com>
Mon, 13 Feb 2017 14:20:55 +0000 (15:20 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 13 Feb 2017 14:20:55 +0000 (15:20 +0100)
... to avoid buggy read/write sizes becoming info leaks.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c

index 270b5c6441abf823f7b28f76991d4d6e5a276e3d..6cd9487291eedbac5682ab8e16b70e7e09157dc4 100644 (file)
@@ -2671,6 +2671,8 @@ x86_emulate(
         ea.reg = decode_register(modrm_rm, &_regs,
                                  (d & ByteOp) && !rex_prefix);
 
+    memset(mmvalp, 0xaa /* arbitrary */, sizeof(*mmvalp));
+
     /* Decode and fetch the source operand: register, memory or immediate. */
     switch ( d & SrcMask )
     {