]> xenbits.xensource.com Git - xen.git/commit
x86/PoD: handle intermediate page orders in p2m_pod_cache_add()
authorJan Beulich <jbeulich@suse.com>
Tue, 23 Nov 2021 12:35:55 +0000 (13:35 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 23 Nov 2021 12:35:55 +0000 (13:35 +0100)
commit1a2e8d6cccddf984fce09b7b8b1139d81cea421e
tree28e332172d9ee7ff91e78b625733e02d92bfb44c
parent398f7aec5dab6ad0853a8b069b48ae304e059fa4
x86/PoD: handle intermediate page orders in p2m_pod_cache_add()

p2m_pod_decrease_reservation() may pass pages to the function which
aren't 4k, 2M, or 1G. Handle all intermediate orders as well, to avoid
hitting the BUG() at the switch() statement's "default" case.

This is CVE-2021-28708 / part of XSA-388.

Fixes: 3c352011c0d3 ("x86/PoD: shorten certain operations on higher order ranges")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
master commit: 8ec13f68e0b026863d23e7f44f252d06478bc809
master date: 2021-11-22 12:27:30 +0000
xen/arch/x86/mm/p2m-pod.c