From dd875db2cb294c339117a07c23c74abe6f35cc07 Mon Sep 17 00:00:00 2001 From: Gleb Natapov <gleb@redhat.com> Date: Wed, 10 Feb 2010 17:58:24 +0200 Subject: [PATCH 2/3] KVM: Disable move to segment registers and jump far instructions. They are executed directly by HW and need to be emulated only in big real mode which is not supported in RHEL5 anyway. On the other hand the emulation doesn't check segment permission properly and correct fix is to intrusive for RHEL5. Message-Id: <1265817504-5121-3-git-send-email-gleb@redhat.com> CVE: CVE-2010-0419 Bugzilla: 563465 Acked-by: Avi Kivity <avi@redhat.com> Acked-by: Marcelo Tosatti <mtosatti@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com> --- arch/x86/kvm/x86_emulate.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index 9e7d5ca..2f654f9 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c @@ -149,7 +149,7 @@ static u32 opcode_table[256] = { ByteOp | DstMem | SrcReg | ModRM | Mov, DstMem | SrcReg | ModRM | Mov, ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov, DstMem | SrcReg | ModRM | Mov, ModRM | DstReg, - DstReg | SrcMem | ModRM | Mov, Group | Group1A, + 0, Group | Group1A, /* 0x90 - 0x97 */ DstReg, DstReg, DstReg, DstReg, DstReg, DstReg, DstReg, DstReg, /* 0x98 - 0x9F */ @@ -191,7 +191,7 @@ static u32 opcode_table[256] = { SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, /* 0xE8 - 0xEF */ ImplicitOps | Stack, SrcImm | ImplicitOps, - ImplicitOps, SrcImmByte | ImplicitOps, + 0, SrcImmByte | ImplicitOps, SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, /* 0xF0 - 0xF7 */ -- 1.6.3.rc4.29.g8146