]> xenbits.xensource.com Git - 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:05 +0000 (12:29 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 5 Sep 2012 11:29:05 +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.c

index 787b4be6a368290d7d99f2c69fe01a5ca0710f4c..54940338d2eb787f9fceda0ebe93b2e34e266312 100644 (file)
@@ -2058,7 +2058,8 @@ guest_physmap_mark_populate_on_demand(struct domain *d, unsigned long gfn,
     int pod_count = 0;
     int rc = 0;
 
-    BUG_ON(!paging_mode_translate(d));
+    if ( !paging_mode_translate(d) )
+        return -EINVAL;
 
     rc = gfn_check_limit(d, gfn, order);
     if ( rc != 0 )