mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
x86/HVM: add missing NULL check before using VMFUNC hook
This is CVE-2016-10025 / XSA-203.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 74dcd0ce6f
master date: 2016-12-21 16:47:19 +0100
This commit is contained in:
1 parent
c7f06e4eed
commit
2eb074fddb
1 file changed
+2
@@ -1620,6 +1620,8 @@ static int hvmemul_vmfunc(
|
||||
{
|
||||
int rc;
|
||||
|
||||
if ( !hvm_funcs.altp2m_vcpu_emulate_vmfunc )
|
||||
return X86EMUL_UNHANDLEABLE;
|
||||
rc = hvm_funcs.altp2m_vcpu_emulate_vmfunc(ctxt->regs);
|
||||
if ( rc != X86EMUL_OKAY )
|
||||
hvmemul_inject_hw_exception(TRAP_invalid_op, 0, ctxt);
|
||||
|
||||