CVE-2026-45931 Overview
CVE-2026-45931 is a use-after-free vulnerability in the Linux kernel's accel/amdxdna driver. The flaw occurs in iommu_sva_unbind_device() when the function accesses iommu_mm after the associated mm structure has already been freed. Some test workloads trigger a kernel crash as a result.
The issue affects the Shared Virtual Addressing (SVA) bind/unbind lifecycle for AMD XDNA accelerator devices. The kernel maintainers resolved the issue by taking an explicit reference to the mm structure after a successful bind and releasing it only after the device is unbound.
Critical Impact
Local workloads exercising the AMD XDNA accelerator's SVA path can crash the kernel through a use-after-free on the process mm structure.
Affected Products
- Linux kernel — accel/amdxdna driver (AMD XDNA AI accelerator)
- Stable kernel branches receiving the backported fix commits
- Systems exposing AMD XDNA devices to userspace via IOMMU SVA
Discovery Timeline
- 2026-05-27 - CVE-2026-45931 published to the National Vulnerability Database (NVD)
- 2026-05-27 - Last updated in NVD database
Technical Details for CVE-2026-45931
Vulnerability Analysis
The vulnerability is a use-after-free [CWE-416] in the AMD XDNA accelerator driver located at accel/amdxdna. When a process binds to the device using IOMMU Shared Virtual Addressing (SVA), the kernel stores a pointer to the process's memory descriptor (iommu_mm). The driver did not hold an additional reference on the underlying mm_struct for the duration of the binding.
If the associated mm structure was freed before iommu_sva_unbind_device() executed, the unbind path dereferenced iommu_mm pointing into already-freed memory. The result was a kernel crash observed during test execution. Workloads that race process teardown against device unbind can reach the unsafe code path.
The fix takes an explicit reference to the mm structure after a successful bind and releases it only after the unbind completes. This guarantees the mm remains valid for the entire SVA bind/unbind lifetime.
Root Cause
The root cause is a missing reference count on the mm_struct across the SVA bind/unbind window. Without mmgrab()/mmdrop() style pinning, the kernel allowed the memory descriptor to be reclaimed while the device driver still held a pointer to it through iommu_mm.
Attack Vector
Triggering the flaw requires local execution and access to an AMD XDNA accelerator device that supports IOMMU SVA. The crash manifests when a process exits or releases its address space while a bound XDNA context is still being torn down. The reporter described it as reproducible through test cases rather than as a remote attack vector. Refer to the upstream commits at Kernel Git Commit Fix, Kernel Git Commit Changes, and Kernel Git Commit Update for the exact source-level changes.
Detection Methods for CVE-2026-45931
Indicators of Compromise
- Kernel oops or panic referencing iommu_sva_unbind_device in the stack trace
- KASAN use-after-free reports citing iommu_mm or AMD XDNA driver frames
- Unexpected process termination on hosts using AMD XDNA accelerators under SVA workloads
Detection Strategies
- Enable KASAN on test kernels to surface use-after-free accesses on mm_struct during XDNA device unbind paths.
- Collect dmesg and kdump output from systems running AMD XDNA workloads and search for crashes in IOMMU SVA functions.
- Inventory kernel versions against the patched commits listed in the upstream references to identify unpatched hosts.
Monitoring Recommendations
- Monitor kernel logs centrally for stack traces involving iommu_sva_unbind_device and amdxdna.
- Track repeated crashes on systems exposing /dev/accel/* devices to user workloads.
- Alert on unexpected reboots of accelerator hosts during AI/ML inference jobs that use SVA.
How to Mitigate CVE-2026-45931
Immediate Actions Required
- Update affected Linux kernels to a version that includes the upstream fix commits f31ccf6278132a35a652fe5eeac3941e1e912398, a9162439ad792afcddc04718408ec1380b7a5f63, and f6b4c1d98a7b8040d4d02e89425b3942016a2c2c.
- Inventory hosts that expose AMD XDNA accelerators and prioritize their patching.
- Restrict access to XDNA device nodes to trusted users until the kernel is updated.
Patch Information
The fix has been merged upstream and backported to stable trees. Apply your distribution's kernel update that incorporates the referenced commits, or rebuild from a stable branch that includes them. See Kernel Git Commit Fix for the canonical change.
Workarounds
- Unload or disable the amdxdna driver on systems that do not require the accelerator.
- Restrict permissions on /dev/accel/* device nodes to limit which users can trigger SVA bind/unbind sequences.
- Avoid running test or workload combinations known to race process teardown against device unbind on unpatched kernels.
# Verify whether the amdxdna driver is loaded and restrict device access
lsmod | grep amdxdna
ls -l /dev/accel/
# Temporarily unload the driver on unpatched hosts (requires no active users)
sudo modprobe -r amdxdna
# Confirm running kernel version against the patched stable release
uname -r
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

