]> xenbits.xensource.com Git - xen.git/commitdiff
x86emul: only emulate software interrupt injection for real mode
authorJan Beulich <jbeulich@suse.com>
Tue, 23 Sep 2014 12:51:12 +0000 (14:51 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 23 Sep 2014 12:51:12 +0000 (14:51 +0200)
Protected mode emulation currently lacks proper privilege checking of
the referenced IDT entry, and there's currently no legitimate way for
any of the respective instructions to reach the emulator when the guest
is in protected mode.

This is XSA-106.

Reported-by: Andrei LUTAS <vlutas@bitdefender.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
master commit: 346d4545569928b652c40c7815c1732676f8587c
master date: 2014-09-23 14:33:50 +0200

xen/arch/x86/x86_emulate/x86_emulate.c

index 1d2eb03dbac622a7bf0633be3cab12cb2ce8948f..45a39b6c5ead34f5b91703757e4527cd2e1fea77 100644 (file)
@@ -2616,6 +2616,7 @@ x86_emulate(
     case 0xcd: /* int imm8 */
         src.val = insn_fetch_type(uint8_t);
     swint:
+        fail_if(!in_realmode(ctxt, ops)); /* XSA-106 */
         fail_if(ops->inject_sw_interrupt == NULL);
         rc = ops->inject_sw_interrupt(src.val, _regs.eip - ctxt->regs->eip,
                                       ctxt) ? : X86EMUL_EXCEPTION;