HIGH
iommu SVA UAF
CVE-2025-71089
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: iommu: disable SVA when CONFIG_X86 is set Patch series "Fix stale IOTLB entries for kernel address space", v7. This proposes a fix for a security vulnerability related to IOMMU Shared Virtual Addressing (SVA). In an SVA context, an IOMMU can cache kernel page table entries. When a kernel page table page is freed and reallocated for another purpose, the IOMMU might still hold stale, incorrect entries. This can be exploited to cause a use-after-free or write-after-free condition, potentially leading to privilege escalation or data corruption. This solution introduces a deferred freeing mechanism for kernel page table pages, which provides a safe window to notify the IOMMU to invalidate its caches before the page is reused. This patch (of 8): In the IOMMU Shared Virtual Addressing (SVA) context, the IOMMU hardware shares and walks the CPU's page tables. The x86 architecture maps the kernel's virtual address space into the upper portion of every process's page table. Consequently, in an SVA context, the IOMMU hardware can walk and cache kernel page table entries. The Linux kernel currently lacks a notification mechanism for kernel page table changes, specifically when page table pages are freed and reused. The IOMMU driver is only notified of changes to user virtual address mappings. This can cause the IOMMU's internal caches to retain stale entries for kernel VA. Use-After-Free (UAF) and Write-After-Free (WAF) conditions arise when kernel page table pages are freed and later reallocated. The IOMMU could misinterpret the new data as valid page table entries. The IOMMU might then walk into attacker-controlled memory, leading to arbitrary physical memory DMA access or privilege escalation. This is also a Write-After-Free issue, as the IOMMU will potentially continue to write Accessed and Dirty bits to the freed memory while attempting to walk the stale page tables. Currently, SVA contexts are unprivileged and cannot access kernel mappings. However, the IOMMU will still walk kernel-only page tables all the way down to the leaf entries, where it realizes the mapping is for the kernel and errors out. This means the IOMMU still caches these intermediate page table entries, making the described vulnerability a real concern. Disable SVA on x86 architecture until the IOMMU can receive notification to flush the paging cache before freeing the CPU kernel page table pages.
02KernelScan AI Analysis
Risk summary
Systems with IOMMU Shared Virtual Addressing on x86 are vulnerable to use-after-free attacks where cached page table entries can be exploited after kernel page table pages are freed and reallocated. This can lead to arbitrary physical memory access via DMA and potential privilege escalation.
Vulnerability analysis
The vulnerability occurs because IOMMU hardware caches kernel page table entries in SVA contexts but lacks notification when these pages are freed. On x86, kernel virtual addresses are mapped in every process page table's upper portion, so the IOMMU walks and caches these entries even for unprivileged contexts. When page table pages are freed and reallocated, the IOMMU may misinterpret new data as valid page table entries, enabling arbitrary DMA access. The fix temporarily disables SVA on x86 until proper cache invalidation mechanisms are implemented.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 5.15 | 5.15.200 | b34289505180 |
| 6.1 | 6.1.163 | 7cad37e35897 |
| 6.12 | 6.12.64 | c2c3f1a3fd74 |
| 6.18 | 6.18.4 | c341dee80b5d |
| 6.6 | 6.6.120 | 240cd7f2812c |
| mainline | 6.19 | 72f98ef9a4be |