mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86emul: fully ignore segment override for register-only operations
For ModRM encoded instructions with register operands we must not
overwrite ea.mem.seg (if a - bogus in that case - segment override was
present) as it aliases with ea.reg.
This is CVE-2015-2151 / XSA-123.
Reported-by: Felix Wilhelm <fwilhelm@ernw.de>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
Reviewed-by: Keir Fraser <keir@xen.org>
master commit: bcf92a5382
master date: 2015-03-10 13:45:51 +0100
This commit is contained in:
1 parent
08d6f790eb
commit
7d6effa69e
1 file changed
+1
-1
@@ -1640,7 +1640,7 @@ x86_emulate(
|
||||
}
|
||||
}
|
||||
|
||||
if ( override_seg != -1 )
|
||||
if ( override_seg != -1 && ea.type == OP_MEM )
|
||||
ea.mem.seg = override_seg;
|
||||
|
||||
/* Decode and fetch the source operand: register, memory or immediate. */
|
||||
|
||||