File CVE-2012-3496-xsa14.patch of Package xen.openSUSE_12.1_Update
xen: Don't BUG_ON() PoD operations on a non-translated guest.
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>
diff -r 1225aff05dd2 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c Thu Aug 09 16:48:07 2012 +0100
+++ b/xen/arch/x86/mm/p2m.c Wed Aug 15 12:10:33 2012 +0100
@@ -2414,7 +2414,8 @@ guest_physmap_mark_populate_on_demand(st
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 )