CVE-2025-38594 Information
Description
In the Linux kernel the following vulnerability has been resolved:
iommu/vt-d: Fix UAF on sva unbind with pending IOPFs
Commit 17fce9d2336d (\iommu/vt-d: Put iopf enablement in domain attach path) disables IOPF on device by removing the device from its IOMMU’s IOPF queue when the last IOPF-capable domain is detached from the device. Unfortunately it did this in a wrong place where there are still pending IOPFs. As a result a use-after-free error is potentially triggered and eventually a kernel panic with a kernel trace similar to the following:
refcount_t: underflow; use-after-free.
WARNING: CPU: 3 PID: 313 at lib/refcount.c:28 refcount_warn_saturate+0xd8/0xe0
Workqueue: iopf_queue/dmar0-iopfq iommu_sva_handle_iopf
Call Trace:
The intel_pasid_tear_down_entry() function is responsible for blocking hardware from generating new page faults and flushing all in-flight ones. Therefore moving iopf_for_domain_remove() after this function should resolve this.
Reference
https://git.kernel.org/stable/c/c68332b7ee893292bba6e87d31ef2080c066c65d https://git.kernel.org/stable/c/f0b9d31c6edd50a6207489cd1bd4ddac814b9cd2
Related CNNVD
CNNVD-202508-2158 (Published: 2025-08-19)
Share on: