summaryrefslogtreecommitdiff
path: root/system/xen/xsa/xsa203-4.8.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/xen/xsa/xsa203-4.8.patch')
-rw-r--r--system/xen/xsa/xsa203-4.8.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/system/xen/xsa/xsa203-4.8.patch b/system/xen/xsa/xsa203-4.8.patch
new file mode 100644
index 0000000000..c9661a4c91
--- /dev/null
+++ b/system/xen/xsa/xsa203-4.8.patch
@@ -0,0 +1,19 @@
+From: Jan Beulich <jbeulich@suse.com>
+Subject: x86/HVM: add missing NULL check before using VMFUNC hook
+
+This is XSA-203.
+
+Signed-off-by: Jan Beulich <jbeulich@suse.com>
+Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
+
+--- a/xen/arch/x86/hvm/emulate.c
++++ b/xen/arch/x86/hvm/emulate.c
+@@ -1694,6 +1694,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, HVM_DELIVER_NO_ERROR_CODE,