]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
xen: Don't BUG_ON() PoD operations on a non-translated guest.
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 5 Sep 2012 11:29:03 +0000 (12:29 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 5 Sep 2012 11:29:03 +0000 (12:29 +0100)
This is XSA-14 / CVE-2012-3496

Signed-off-by: Tim Deegan <tim@xen.org>
Reviewed-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/x86/mm/p2m-pod.c

index 26117cfa7696d914c9a9bf90b99c4345e92b0edb..1ddf99120846dc589990e23de6abd54bbd8b8258 100644 (file)
@@ -1117,7 +1117,8 @@ guest_physmap_mark_populate_on_demand(struct domain *d, unsigned long gfn,
     mfn_t omfn;
     int rc = 0;
 
-    BUG_ON(!paging_mode_translate(d));
+    if ( !paging_mode_translate(d) )
+        return -EINVAL;
 
     rc = p2m_gfn_check_limit(d, gfn, order);
     if ( rc != 0 )