HIGH
kvm vgic-its Cache UAF
CVE-2026-46316
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: KVM: arm64: vgic-its: Drop the translation cache reference only for the erased entry vgic_its_invalidate_cache() walks the per-ITS translation cache with xa_for_each() and drops the cache's reference on each entry with vgic_put_irq(). It puts the iterated pointer, though, rather than the value returned by xa_erase(). The function is called from contexts that do not exclude one another: the ITS command handlers hold its_lock, the GITS_CTLR write path holds cmd_lock, and the path that clears EnableLPIs in a redistributor's GICR_CTLR holds neither. Two or more of them can drain the same cache concurrently, and if each one observes the same entry, erases it and then puts it, the single reference the cache holds on that entry is dropped more than once. The entry can then be freed while an ITE still maps it. xa_erase() is atomic and returns the previous entry, so put only the entry that this context actually removed. The cache reference is then dropped exactly once per entry even when the invalidations run concurrently, and the behavior is unchanged when only one context runs.
02KernelScan AI Analysis
Risk summary
A malicious guest VM can trigger a use-after-free in KVM's ARM64 VGIC-ITS translation cache by concurrently invalidating cache entries from multiple vCPUs. The race causes a double reference drop, leading to premature freeing of IRQ descriptors while they remain mapped by Interrupt Translation Entries (ITEs). This can result in host memory corruption, denial of service (host crash), or potential guest-to-host privilege escalation, affecting all VMs on the host.
Vulnerability analysis
The vulnerability exists in vgic_its_invalidate_cache(), which walks the per-ITS translation cache with xa_for_each() and drops references using vgic_put_irq(). The bug is that it puts the iterated pointer rather than the value returned by xa_erase(). Because the function can be called concurrently from guest-triggered contexts that do not mutually exclude one another (ITS command handlers, GITS_CTLR writes, and GICR_CTLR writes), two or more vCPUs can observe the same entry, call xa_erase() (only one succeeds), but all call vgic_put_irq(). This drops the single cache reference multiple times, freeing the IRQ descriptor while an ITE still maps it. The fix ensures only the context that successfully erases an entry drops the reference by using xa_erase()'s return value.
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 6.12 | 6.12.93 | b7b72e880463 |
| 6.18 | 6.18.35 | 2bbc395e81bd |
| 7.0 | 7.0.12 | 9121f4605ab9 |
| mainline | 7.1-rc7 | 13031fb6b835 |