x86: properly set up fbld emulation operand address
authorJan Beulich <jbeulich@suse.com>
Mon, 30 Sep 2013 12:18:58 +0000 (14:18 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 30 Sep 2013 12:18:58 +0000 (14:18 +0200)
This is CVE-2013-4361 / XSA-66.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c

index bb40b83b4559eeb6737a82e7162da1630234d6a7..e89035b75bd24d32f7ba7eca022042550a3155dc 100644 (file)
@@ -3177,11 +3177,11 @@ x86_emulate(
                 break;
             case 4: /* fbld m80dec */
                 ea.bytes = 10;
-                dst = ea;
+                src = ea;
                 if ( (rc = ops->read(src.mem.seg, src.mem.off,
                                      &src.val, src.bytes, ctxt)) != 0 )
                     goto done;
-                emulate_fpu_insn_memdst("fbld", src.val);
+                emulate_fpu_insn_memsrc("fbld", src.val);
                 break;
             case 5: /* fild m64i */
                 ea.bytes = 8;