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:
Jan Beulich committed 2016-12-21 17:45:42 +01:00
1 parent c7f06e4eed
commit 2eb074fddb
1 file changed
+2
+2
View File
@@ -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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.