From: Jan Beulich Date: Tue, 18 Nov 2014 13:15:21 +0000 (+0100) Subject: x86: don't allow page table updates on non-PV page tables in do_mmu_update() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4086 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e4292c5aac41b80f33d4877104348d5ee7c95aa4;p=xen.git 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 CVE-2014-8594 / XSA-109. Signed-off-by: Jan Beulich Acked-by: Tim Deegan --- diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index edd1923b1c..8ee9938061 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -3493,6 +3493,10 @@ long do_mmu_update( { p2m_type_t p2mt; + rc = -EOPNOTSUPP; + if ( unlikely(paging_mode_refcounts(pt_owner)) ) + break; + xsm_needed |= XSM_MMU_NORMAL_UPDATE; if ( get_pte_flags(req.val) & _PAGE_PRESENT ) {