mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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. This is CVE-2015-0361 / XSA-116. 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 commit is contained in:
1 parent
8233ca53ad
commit
d3c151fd3a
1 file changed
+3
-3
@@ -1487,9 +1487,6 @@ int hvm_domain_initialise(struct domain *d)
|
||||
|
||||
void hvm_domain_relinquish_resources(struct domain *d)
|
||||
{
|
||||
xfree(d->arch.hvm_domain.io_handler);
|
||||
xfree(d->arch.hvm_domain.params);
|
||||
|
||||
if ( is_pvh_domain(d) )
|
||||
return;
|
||||
|
||||
@@ -1511,6 +1508,9 @@ void hvm_domain_relinquish_resources(struct domain *d)
|
||||
|
||||
void hvm_domain_destroy(struct domain *d)
|
||||
{
|
||||
xfree(d->arch.hvm_domain.io_handler);
|
||||
xfree(d->arch.hvm_domain.params);
|
||||
|
||||
hvm_destroy_cacheattr_region_list(d);
|
||||
|
||||
if ( is_pvh_domain(d) )
|
||||
|
||||