pkgsrc-ng/sysutils/xenkernel42/patches/patch-CVE-2014-8594
2016-01-21 23:40:00 +01:00

28 lines
856 B
Plaintext

$NetBSD: patch-CVE-2014-8594,v 1.1 2014/11/27 15:20:31 bouyer Exp $
x86: don't allow page table updates on non-PV page tables in do_mmu_update()
paging_write_guest_entry() and paging_cmpxchg_guest_entry() aren't
consistently supported for non-PV guests (they'd deref NULL for PVH or
non-HAP HVM ones). Don't allow respective MMU_* operations on the
page tables of such domains.
This is XSA-109.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
--- xen/arch/x86/mm.c.orig
+++ xen/arch/x86/mm.c
@@ -3800,6 +3800,10 @@ long do_mmu_update(
{
p2m_type_t p2mt;
+ rc = -EOPNOTSUPP;
+ if ( unlikely(paging_mode_refcounts(pt_owner)) )
+ break;
+
rc = xsm_mmu_normal_update(d, pt_owner, pg_owner, req.val);
if ( rc )
break;