xen: Don't BUG_ON() PoD operations on a non-translated guest. This is XSA-14 / CVE-2012-3496 Signed-off-by: Tim Deegan Reviewed-by: Ian Campbell Tested-by: Ian Campbell diff -r 353bc0801b11 xen/arch/x86/mm/p2m-pod.c --- a/xen/arch/x86/mm/p2m-pod.c Mon Aug 06 12:28:03 2012 +0100 +++ b/xen/arch/x86/mm/p2m-pod.c Wed Aug 15 12:06:43 2012 +0100 @@ -1117,7 +1117,8 @@ guest_physmap_mark_populate_on_demand(st 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 )