]> xenbits.xensource.com Git - xen.git/commitdiff
x86: don't allow page table updates on non-PV page tables in do_mmu_update()
authorJan Beulich <jbeulich@suse.com>
Tue, 18 Nov 2014 13:32:57 +0000 (14:32 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 18 Nov 2014 13:32:57 +0000 (14:32 +0100)
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 CVE-2014-8594 / XSA-109.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm.c

index 9ec617b1105df23c74222f0335ecd0305b459157..121aef4bbd069fa8c3c30910e1dbd1fb1c80a8a5 100644 (file)
@@ -3794,6 +3794,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;