accel/amdxdna: Fix iommu domain lifetime race during device removal
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
accel/amdxdna: Fix iommu domain lifetime race during device removal
When force_iova mode is enabled, amdxdna_remove() frees xdna->domain. If amdxdna_gem_obj_free() is called after device removal, it may attempt to access xdna->domain, resulting in a use-after-free.
Fix the race by adding freeing xdna->domain as a managed release action, so its lifetime is managed by DRM and remains valid until all managed resources are released.
From the CVE record · Linux
In the Linux kernel's amdxdna driver, device removal can free an IOMMU domain that is later accessed when a GEM object is freed, causing a use-after-free. This occurs when force_iova mode is enabled; the input does not specify how an attacker could trigger it or whether network access, authentication, or user interaction is required.
Engineers running the Linux kernel with the amdxdna driver should check their installations; affected versions are not specified.