]> xenbits.xensource.com Git - xen.git/commit
x86/HAP: adjust monitor table related error handling
authorJan Beulich <jbeulich@suse.com>
Tue, 11 Oct 2022 12:21:56 +0000 (14:21 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 11 Oct 2022 12:21:56 +0000 (14:21 +0200)
commit5b44a61180f4f2e4f490a28400c884dd357ff45d
tree1c5ac2a0aa966a0cf4dda2294fb6995b29bf532b
parent1df52a270225527ae27bfa2fc40347bf93b78357
x86/HAP: adjust monitor table related error handling

hap_make_monitor_table() will return INVALID_MFN if it encounters an
error condition, but hap_update_paging_modes() wasn’t handling this
value, resulting in an inappropriate value being stored in
monitor_table. This would subsequently misguide at least
hap_vcpu_teardown(). Avoid this by bailing early.

Further, when a domain has/was already crashed or (perhaps less
important as there's no such path known to lead here) is already dying,
avoid calling domain_crash() on it again - that's at best confusing.

This is part of CVE-2022-33746 / XSA-410.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/mm/hap/hap.c