[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: get_page_from_gfn() must return NULL for invalid GFNs


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Wed, 05 Dec 2012 12:11:13 +0000
  • Delivery-date: Wed, 05 Dec 2012 12:11:21 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1354646311 0
# Node ID bc624b00d6d601f00a53c2f7502a82dcef60f882
# Parent  f2c836302c0fc21a58b307a4cd7418734f1f721e
x86: get_page_from_gfn() must return NULL for invalid GFNs

... also in the non-translated case.

This is XSA-32 / CVE-2012-xxxx.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---


diff -r f2c836302c0f -r bc624b00d6d6 xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h Tue Dec 04 18:38:26 2012 +0000
+++ b/xen/include/asm-x86/p2m.h Tue Dec 04 18:38:31 2012 +0000
@@ -384,7 +384,7 @@ static inline struct page_info *get_page
     if (t)
         *t = p2m_ram_rw;
     page = __mfn_to_page(gfn);
-    return get_page(page, d) ? page : NULL;
+    return mfn_valid(gfn) && get_page(page, d) ? page : NULL;
 }
 
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.