mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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> Committed-by: Ian Jackson <ian.jackson.citrix.com>
This commit is contained in:
1 parent
b1fab50952
commit
f2ccf981be
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||