[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/emul: Reject LGDT/LIDT attempts with non-canonical base addresses
commit 12bc22f79117dfae5e59382cdda6b8b6b70a7554 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Wed Nov 2 14:43:48 2016 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Nov 3 12:23:23 2016 +0000 x86/emul: Reject LGDT/LIDT attempts with non-canonical base addresses No sane OS would deliberately try this, but make Xen's emulation match real hardware by delivering #GP(0), rather than suffering a VMEntry failure. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <JBeulich@xxxxxxxx> Release-acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- xen/arch/x86/x86_emulate/x86_emulate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 7a707dc..58e1ed8 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -4443,6 +4443,7 @@ x86_emulate( (rc = read_ulong(ea.mem.seg, ea.mem.off+2, &base, mode_64bit() ? 8 : 4, ctxt, ops)) ) goto done; + generate_exception_if(!is_canonical_address(base), EXC_GP, 0); sreg.base = base; sreg.limit = limit; if ( op_bytes == 2 ) -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |