aboutsummaryrefslogtreecommitdiffstats
path: root/main/xen/xsa32-4.2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/xen/xsa32-4.2.patch')
-rw-r--r--main/xen/xsa32-4.2.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/main/xen/xsa32-4.2.patch b/main/xen/xsa32-4.2.patch
new file mode 100644
index 0000000000..98006097b2
--- /dev/null
+++ b/main/xen/xsa32-4.2.patch
@@ -0,0 +1,22 @@
+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@suse.com>
+Acked-by: Tim Deegan <tim@xen.org>
+
+diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h
+index 7a7c7eb..d5665b8 100644
+--- a/xen/include/asm-x86/p2m.h
++++ b/xen/include/asm-x86/p2m.h
+@@ -400,7 +400,7 @@ static inline struct page_info *get_page_from_gfn(
+ 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;
+ }
+
+