Executive brief
AMD's amdxdna accelerator driver contains a use-after-free vulnerability in IOMMU domain management. When the IOMMU forced-IOVA mode is enabled, the driver incorrectly frees the IOMMU domain during device removal, but GEM objects may attempt to access this freed domain later, causing a kernel crash or potential code execution. This affects systems using AMD's AI accelerators with specific IOMMU configurations.
Technical details
The vulnerability is a use-after-free race condition in the amdxdna driver's IOMMU initialization and cleanup routines. When force_iova mode is enabled, amdxdna_remove() frees the xdna->domain, but if amdxdna_gem_obj_free() is called after device removal, it may attempt to access the already-freed domain. The fix moves domain freeing from amdxdna_iommu_fini() to a DRM-managed cleanup action via drmm_add_action(), ensuring the domain lifetime is controlled by the DRM device's managed resource system and remains valid until all dependent resources are released. The vulnerability requires force_iova module parameter to be enabled and affects the amdxdna_iommu.c driver code.
Affected products
- Linux Linux kernel Affected versions include those with amdxdna accelerator driver support; patched in upstream and stable branches
Timeline
- 2026-08-28: disclosed
- 2026-06-10: patched: Upstream fix committed by Lizhi Hou
- 2026-07-24: patched: Backported to stable kernels by Greg Kroah-Hartman