mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
KVM: x86 emulator: Forbid modifying CS segment register by mov instruction
commit 8b9f44140b upstream.
Inject #UD if guest attempts to do so. This is in accordance to Intel
SDM.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1c731613a9
commit
8bc4cf28e8
@@ -1987,6 +1987,12 @@ special_insn:
|
||||
int err;
|
||||
|
||||
sel = c->src.val;
|
||||
|
||||
if (c->modrm_reg == VCPU_SREG_CS) {
|
||||
kvm_queue_exception(ctxt->vcpu, UD_VECTOR);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (c->modrm_reg == VCPU_SREG_SS)
|
||||
toggle_interruptibility(ctxt, X86_SHADOW_INT_MOV_SS);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user