x86/HVM: prevent use-after-free when destroying a domain

hvm_domain_relinquish_resources() can free certain domain resources
which can still be accessed, e.g. by HVMOP_set_param, while the domain
is being cleaned up.

Signed-off-by: Mihai Donțu <mdontu@bitdefender.com>
Tested-by: Răzvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>

This is CVE-2015-0361 / XSA-116.
This commit is contained in:
Mihai Donțu authored and Ian Jackson committed 2015-01-06 12:52:21 +00:00
1 parent 5cd7ed0253
commit 5d4e3ff19c
1 file changed
+2 -2
+2 -2
View File
@@ -602,13 +602,13 @@ void hvm_domain_relinquish_resources(struct domain *d)
hpet_deinit(d);
}
xfree(d->arch.hvm_domain.io_handler);
xfree(d->arch.hvm_domain.params);
xfree(d->arch.hvm_domain.pbuf);
}
void hvm_domain_destroy(struct domain *d)
{
xfree(d->arch.hvm_domain.io_handler);
xfree(d->arch.hvm_domain.params);
hvm_funcs.domain_destroy(d);
rtc_deinit(d);
stdvga_deinit(d);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.