mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
VT-d: fix deassign of device with RMRR
Ignoring a specific error code here was not meant to short circuit deassign to _just_ the unmapping of RMRRs. This bug was previously hidden by the bogus (potentially indefinite) looping in pci_release_devices(), untilf591755823("IOMMU/PCI: don't let domain cleanup continue when device de-assignment failed") fixed that loop. This is CVE-2021-28702 / XSA-386. Fixes:8b99f4400b("VT-d: fix RMRR related error handling") Reported-by: Ivan Kardykov <kardykov@tabit.pro> Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-by: Ivan Kardykov <kardykov@tabit.pro> (cherry picked from commit 24ebe875a77833696bbe5c9372e9e1590a7e7101)
This commit is contained in:
1 parent
6e2fc128eb
commit
b4bb02d599
1 file changed
+1
-1
@@ -2393,7 +2393,7 @@ static int reassign_device_ownership(
|
||||
ret = iommu_identity_mapping(source, p2m_access_x,
|
||||
rmrr->base_address,
|
||||
rmrr->end_address, 0);
|
||||
if ( ret != -ENOENT )
|
||||
if ( ret && ret != -ENOENT )
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||