CVE-2026-46316 patches three lines in arch/arm64/kvm/vgic/vgic-its.c. The function those lines live in is vgic_its_invalidate_cache, which walks the per-ITS translation cache with xa_for_each and drops the cache's reference on each entry. The commit message names three calling contexts and the locks they hold: ITS command handlers hold its_lock, the GITS_CTLR write path holds cmd_lock, the path that clears EnableLPIs in a redistributor's GICR_CTLR holds neither. Two or more drainers can run the same function on the same xarray at the same time. The patch does not change that. The patch makes xa_erase's atomicity the synchronization.
CVE-2026-46316: ITScape's Three Drainers Don't Share A Lock. The Patch Trusts xa_erase Instead.
vendor
pattern
cve
proof of concept
The commit message names three drainers
CVE-2026-46316 is Hyunwoo Kim's commit 13031fb6b835, authored 2026-06-01 23:53 KST and merged into kvm/master four days later by Marc Zyngier. The commit message opens with the function's behavior and immediately names the contexts the function runs in:
"
vgic_its_invalidate_cache()walks the per-ITS translation cache withxa_for_each()and drops the cache's reference on each entry withvgic_put_irq(). It puts the iterated pointer, though, rather than the value returned byxa_erase().The function is called from contexts that do not exclude one another: the ITS command handlers hold
its_lock, theGITS_CTLRwrite path holdscmd_lock, and the path that clearsEnableLPIsin a redistributor'sGICR_CTLRholds 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."
Three contexts. Three different locks, where one of those locks is no lock at all. The third caller, vgic_mmio_write_v3r_ctlr, is the path the guest reaches through MMIO. A guest writing the redistributor's GICR_CTLR register with EnableLPIs cleared enters this chain:
static void vgic_mmio_write_v3r_ctlr(struct kvm_vcpu *vcpu,
gpa_t addr, unsigned int len,
unsigned long val)
{
struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
u32 ctlr;
if (!vgic_has_its(vcpu->kvm))
return;
if (!(val & GICR_CTLR_ENABLE_LPIS)) {
ctlr = atomic_cmpxchg_acquire(&vgic_cpu->ctlr,
GICR_CTLR_ENABLE_LPIS,
GICR_CTLR_RWP);
if (ctlr != GICR_CTLR_ENABLE_LPIS)
return;
vgic_flush_pending_lpis(vcpu);
vgic_its_invalidate_all_caches(vcpu->kvm);
atomic_set_release(&vgic_cpu->ctlr, 0);
}The cmpxchg is per-vCPU state. A single vCPU enters vgic_its_invalidate_all_caches at most once per enable/disable cycle. Two vCPUs entering at the same moment enter twice. vgic_its_invalidate_all_caches walks the VM's ITS device list under rcu_read_lock and calls vgic_its_invalidate_cache(its) on each ITS's xarray. The ITS is VM-global. The xarray is the same xarray. The two vCPUs are now in the same function on the same data structure, holding only the read-side RCU lock that allows them both to walk.
The commit message states the locking gap as the existence condition of the bug. Naming a gap is acknowledging it.
The patch is three lines and does not take a lock
The CVE-2026-46316 diff:
@@ -597,8 +597,10 @@ static void vgic_its_invalidate_cache(struct vgic_its *its)
unsigned long idx;
xa_for_each(&its->translation_cache, idx, irq) {
- xa_erase(&its->translation_cache, idx);
- vgic_put_irq(kvm, irq);
+ /* Only the context that erases the entry drops its cache ref. */
+ irq = xa_erase(&its->translation_cache, idx);
+ if (irq)
+ vgic_put_irq(kvm, irq);
}
}The pre-patch loop calls xa_erase(&its->translation_cache, idx) for its side effect and then puts irq, the iteration variable that xa_for_each populated on its last advance. The post-patch loop assigns xa_erase's return value back into irq and only puts when that return is non-NULL.
xa_erase is atomic. The xarray's internal locking guarantees that for any given (xa, idx) pair, exactly one concurrent caller wins, gets the previous entry, and observes the slot empty afterward; every other concurrent caller gets NULL. The new line reads the atomic outcome instead of the iteration outcome. If a peer drainer already erased index idx between this drainer's xa_for_each advance and this drainer's xa_erase, the local xa_erase returns NULL, the if skips the put, and the cache reference for that entry is dropped by whichever drainer's xa_erase actually emptied the slot.
The patch closes the double-put. It does not close the unsynchronized drain. The three callers still call vgic_its_invalidate_cache from contexts that do not exclude one another. Two of them still enter the function on the same xarray at the same time. The loop still races against itself. What changed is that the race no longer drops the same reference twice; xa_erase's atomicity is the only thing that makes the race idempotent.
The fix Hyunwoo names as 13031fb6b835 is also the fix Hyunwoo wrote. He reported, he patched, and the maintainers reviewed and merged on his timeline. Oliver Upton reviewed; Marc Zyngier signed off. The commit closing the bug is in the same author field as the exploit demonstrating it.
The race still races
Walk it forward post-patch. Four vCPUs simultaneously write GICR_CTLR with the EnableLPIs bit cleared. Each vCPU's per-vCPU cmpxchg succeeds, each calls vgic_its_invalidate_all_caches(vcpu->kvm), all four enter the RCU walk of the VM's ITS list, all four reach vgic_its_invalidate_cache(its) for the same ITS. Four threads, one xarray, no shared lock.
The four threads each begin xa_for_each. Each thread's iteration sees some subset of the xarray's currently-populated indices. They overlap. Two threads advance to index idx=N independently. Both observe the same vgic_irq * pointer in irq. Both call xa_erase(&its->translation_cache, N). One thread's xa_erase returns the pointer; the other thread's xa_erase returns NULL. Only the first calls vgic_put_irq. One put per entry.
The race exists. The race is observable in the trace. The race produces no UAF, because every entry's cache reference is dropped exactly once by whichever thread the xarray's internal lock chose. Any consequence of two threads draining the same xarray concurrently that does not reduce to "the cache reference is double-dropped on a vgic_irq" is still in scope. The patch's correctness rests on a counterfactual: that no other shared state inside this function will ever care about which of the four concurrent drainers actually erased an entry. The function's body today is one xa_erase plus one vgic_put_irq call; the counterfactual holds for that body. The body is one commit away from changing.
The exploit the patch closes is 1005 lines
Hyunwoo's CVE-2026-46316 exploit, ITScape, is published at github.com/V4bel/ITScape under SPDX GPL-2.0. The README calls it "the first guest-to-host escape exploit research targeting KVM/arm64." The exploit body, poc.c, is 1005 lines of C built on top of the kernel's tools/testing/selftests/kvm framework. The PoC targets Linux v7.1-rc6 (the build immediately before 13031fb6b835) with hardcoded image offsets and runs under QEMU TCG emulating an arm64 host. The host kernel is what gets escaped.
The chain has six stages and the PoC labels each one in the source.
Prime the translation cache. A populated cache is the precondition the bug requires; an empty xarray has nothing to double-put. The PoC's test_data declares nr_devices=128 and nr_event_ids=1024, and the guest issues MAPD / MAPTI / INT commands to install 131,072 translation entries. The same intids are reused across two ITSes (GITS0_BASE_GPA and GITS1_BASE_GPA), so each (devid,eventid) slot in ITS#1's ITE table points at the same vgic_irq object as the corresponding ITS#0 slot. The PoC labels this comment [5]: "when ITS#1 uses the same intids as ITS#0, the ITEs of the two ITSes point to the same vgic_irq." After the free, both ITSes carry dangling ITEs aimed at the same freed slab object.
Trigger the double-put. guest_barrier() aligns the four vCPUs. Each vCPU writes its own GICR_CTLR with EnableLPIs=0. All four enter vgic_its_invalidate_all_caches and drain the same VM-global ITS xarray under rcu_read_lock. Pre-patch, two drainers iterating to the same index both put the iteration variable, the vgic_irq's refcount drops to zero too early, and kfree_rcu schedules the slab object for free.
Force the slab back into circulation. This is the novel part. vgic_irq is kzalloc(... GFP_KERNEL_ACCOUNT), which lands it in kmalloc-cg-96. The PoC creates a guest_memfd region with GUEST_MEMFD_FLAG_MMAP | GUEST_MEMFD_FLAG_INIT_SHARED, the flag pair that lets non-confidential VMs back guest pages with host pages the guest can directly map. The flag pair was added to give regular VMs a guest_memfd fast path; the flag pair is the cross-cache primitive. The guest faults in 32 MB of the region, the per-CPU SLUB cache for cgroup-accounted 96-byte allocations bleeds dry, freed slab pages get reused as guest_memfd backing, and the guest now mmaps the same page whose 96-byte slots used to hold vgic_irqs. The guest writes every 96-byte slot of every backing page with a hand-authored fake vgic_irq, byte for byte.
Read a kernel pointer with no crash. With vcpu=0, active=1, ops=NULL, and intid=8192 planted on every slot, the guest sends MOVI to migrate the dangling LPI to collection 0. The kernel updates the affinity by writing vcpu0's actual kernel address into the fake irq's target_vcpu field at offset 48. The guest scans gmem+48 and reads vcpu0's kaddr.
Read an image pointer using the kernel address. Hyunwoo's writeup calls this the ISO-LEAK. With target_vcpu set to V + 7328 - 6656 (the offset of pmu.overflow_work.func inside the vcpu struct minus the offset of ap_list_head.prev), the fake irq travels the native path of vgic_queue_irq_unlock. __list_add performs new->prev = head->prev; that store deposits *(V + 7328) = kvm_pmu_perf_overflow_notify_vcpu, an image-anchored function pointer, into the fake irq's ap_list.prev field, which is a gmem slot the guest reads back. The very next statement in __list_add is head->prev->next = new, which writes through the same pointer just read. The pointer points at .text. The write faults. vCPU0 dies inside __list_add after the leak value has landed in gmem and before the kernel reaches any cross-CPU broadcast logic. The death is isolated to ITS#0's cmd_lock, which vCPU0 still holds at exit. A surviving vCPU reads gmem+32, scans for a value whose top bits match the kernel image's upper half, and computes kimage_voffset = leaked - linked_addr(kvm_pmu_perf_overflow_notify_vcpu).
Plant the writes through the gadget. With the slide known, the fake irq's ops is no longer NULL. The PoC sets it to a controlled gmem address whose offset 16 holds the runtime address of a four-instruction store sequence at ed_deschedule+0xd4. The sequence writes the irq pointer's +0x28 field to the address at +0x20. The guest plants four sweeps: three writes overwriting poweroff_cmd (/sbin/poweroff by default, in .data) with /bin/touch /ITScape, and one write replacing arp_tbl.gc_work.work.func (neigh_periodic_work by default) with orderly_poweroff. ITS#1's command queue fires the INT that resolves the dangling ITE, the kernel calls irq->ops->queue_irq_unlock(kvm, irq, flags), and the gadget writes. ITS#0's cmd_lock is still held by the dead vCPU0; the second ITS is the surviving issue path.
Wait fifteen seconds. The gadget runs inside vgic_queue_irq_unlock without releasing the lock the entry path acquired, so the executing vCPU leaks a preempt_count. Calling call_usermodehelper while a preempt leak is outstanding deadlocks the host RCU. The PoC's vCPU1, the one that fired the gadget, exits via GUEST_DONE (do_exit), which heals the preempt leak. vCPU2 and vCPU3 spin to keep the VM from tearing down on the corrupted vGIC. Within about fifteen seconds the host's neighbor garbage collector wakes up, schedules arp_tbl.gc_work, and the workqueue dispatcher calls the function pointer the guest overwrote: orderly_poweroff runs, schedules poweroff_work, and __orderly_poweroff invokes run_cmd(poweroff_cmd) via call_usermodehelper(... UMH_WAIT_EXEC). The host kernel forks /bin/touch /ITScape as root.
[overwritten] orderly_poweroff(&arp_tbl.gc_work.work)
schedule_work(&poweroff_work)
poweroff_work_func(work)
__orderly_poweroff(poweroff_force=false)
run_cmd(poweroff_cmd = "/bin/touch /ITScape")
call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC) /* runs as root */The PoC's parent process polls for /ITScape to appear on the host filesystem. When it does, the escape has succeeded. The PoC's demo screencast shows it.
The 96-byte UAF is the bug. The escape is the composition.
The CVE the patch closes is the double-put. The capability the exploit demonstrates is a kmalloc-cg-96 slab UAF where the guest authors all 96 bytes. Those are not the same thing, and the second does not exist without four design decisions outside arch/arm64/kvm/vgic/vgic-its.c that the patch does not touch.
The first decision is guest_memfd's MMAP | INIT_SHARED mode. guest_memfd was introduced to back confidential VMs (TDX, SEV-SNP, pKVM) with pages neither the host userspace nor a peer guest can read. The MMAP-and-init-shared flag pair was added to let non-confidential VMs use the same FD type without paying the confidential-VM cost, on the reasoning that a non-confidential VM's memory is already host-readable. The shared mode lets the host VMM mmap the FD into its own address space, and the guest itself maps the page on the guest side. Two address spaces, one host page. When the host slab allocator hands out a kmalloc-cg-96 page and the guest_memfd allocator hands out the same page later, the guest's mmap of that page is a direct window onto whatever slab objects last sat there. The flag pair is correct in isolation. Its composition with cgroup-accounted slab merging is the cross-cache primitive.
The second decision is the vgic_irq field layout. A 96-byte object whose fields include a raw_spinlock_t at offset 0 (the guest writes zero, the kernel treats it as unlocked), a target_vcpu pointer at offset 48 (the guest writes a forged value, the kernel reads it as authoritative routing), a refcount at offset 60 (the guest writes anything > 0 and the kernel honors it), and an irq_ops * at offset 80 (the guest writes a gmem address, the kernel makes an indirect call to *(ops+16)). Every field the kernel reads has a permissive interpretation. Replacing any one of those fields with an opaque handle or an enum tag would have closed the entire fake-object construction. None of them are.
The third decision is orderly_poweroff's indirection through a workqueue. The function exists because the kernel needs to invoke a userspace helper from contexts that cannot themselves call call_usermodehelper; the indirection is the contract. The contract lets the exploit fire the gadget in a context that holds an irrelevant lock, exit that context cleanly, and have the workqueue dispatch the userspace command later. Without the indirection the gadget would deadlock; with the indirection the deadlock is decoupled.
The fourth decision is arp_tbl.gc_work running every fifteen seconds regardless of network state. The workqueue's func field is a writable kernel symbol whose call site activates on a kernel timer, not on attacker input. The exploit overwrites the symbol and waits. The attacker does not need to fire anything; the host does. The PoC's last log line is WWW done (poweroff_cmd + orderly_poweroff planted); waiting for neigh-gc UMH.
Hyunwoo borrowed the workqueue trick from Project Zero's An EPYC Escape. The 2021 EPYC writeup used the same pattern on x86. The kernel-side decisions the pattern depends on, orderly_poweroff exists, arp_tbl.gc_work re-arms, call_usermodehelper runs in kernel context as root, are architecture-independent. The arm64-specific piece of CVE-2026-46316 is the cross-cache via guest_memfd MMAP|INIT_SHARED. The cross-cache is what made the pattern reachable from a vGIC-ITS bug, the way an x86 SEV reflection made it reachable from the EPYC bug.
This is Emergent Primitive. The double-put in vgic_its_invalidate_cache is owned by arch/arm64/kvm/vgic/. guest_memfd MMAP|INIT_SHARED is owned by virt/kvm/guest_memfd.c. The kmalloc-cg-96 slab merging is owned by mm/slub.c. The arp_tbl.gc_work.func indirection is owned by net/core/neighbour.c. The orderly_poweroff workqueue dispatch is owned by kernel/reboot.c. The escape primitive lives at the intersection. The patch lives in one of the five files.
What's actually patched, and what isn't
The patch on vgic_its_invalidate_cache closes the specific double-put. Backporting it to [email protected], which Cc: makes explicit, will close it on every supported branch. KASAN traces of guest workloads triggering the path will go quiet. CVE-2026-46316's affected-versions field, which the kernel CNA will likely fill with the range from 8201d1028caa (2024-04-25, the commit that introduced the translation cache) to the patched build, will be accurate at the level of "no longer triggers the documented chain."
The unsynchronized drain is still there. Three callers still enter vgic_its_invalidate_cache from contexts that do not exclude one another. The GICR_CTLR.EnableLPIs write path still calls vgic_its_invalidate_all_caches(kvm) under rcu_read_lock only. A future modification to the loop body, an audit-counter increment, a tracepoint with a side effect, a kfree call somewhere, will sit on top of the same race. The next bug in this drain will not be a refcount.
The cross-cache via guest_memfd MMAP|INIT_SHARED is still there. Any future kmalloc-cg-* UAF in code reachable from a guest VM, on any host that has shared-mode guest_memfd enabled, has a guest-side cross-cache available. ITScape is the first exploit to use this primitive. The README says "more variants and follow-up vulnerabilities are expected." The 96-byte size is a coincidence of vgic_irq's layout; a different victim object lands the guest in a different kmalloc-cg-N slab, and guest_memfd's backing allocator does not care which.
The KASLR leak via __list_add storing head->prev into the fake irq's ap_list.prev is still there. The list_add_tail(&irq->ap_list, &vcpu->arch.vgic_cpu.ap_list_head) call in vgic_queue_irq_unlock is the operational path; replacing the list primitive would change the function's semantics. The death-in-the-same-list_add mechanic that decouples the leak from any crash logging is independent of the patch.
The arp_tbl.gc_work.func overwrite primitive is still there. Every struct work_struct whose func field sits at a writable symbol the attacker can locate is a write-what-where target. Hardening would mean some form of CFI on workqueue dispatch; the PoC's "forward-edge CFI is not applied" assumption holds for the v7.1-rc6 arm64 build and for production cloud kernels currently in use.
CVSS PR:N means no privileges on the host
CVE-2026-46316's vector reads AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H, score 9.3. PR:N is "no privileges required." The PoC's FAQ section says, in full: "Do I need root inside the guest VM? Yes. Driving GIC/ITS MMIO requires guest kernel (EL1) privilege. When you are allocated an instance on a public cloud you usually have root on your own VM, so this is satisfied. In a scenario without guest root, it must be chained with an LPE such as Dirty Frag."
Both statements describe the same exploit. CVSS's "privileges" field models the host's view: an attacker who controls a guest VM has zero privileges on the host. The guest-side prerequisite that the attacker is uid=0 inside the guest is below the CVSS vector's resolution. For a multi-tenant arm64 cloud where every tenant has guest root by definition, the two statements agree on the operational consequence. For a CVSS-as-prioritization workflow that excludes "requires guest root" from the priority calculation, the vector is what they will see.
The same author shipped the LPE chain for the guest-root precondition. dirtyfrag is the bug Hyunwoo is referring to in the FAQ. The chain composes.
Disclosure timeline
The PoC's writeup at assets/write-up.md records the timeline in the author's own words: 2026-06-01 to [email protected] and the kvmarm list; 2026-06-05 merge into kvm/master and mainline; 2026-06-05 to [email protected] with a five-day embargo; 2026-06-09 CVE assignment as CVE-2026-46316; 2026-06-10 publication.
The patch was upstream four days before the CVE was assigned, and five days before the PoC went public. The window where the host kernel was patched but the exploit was not yet public was exactly the embargo length: five days. The kernel CNA assigned the CVE after the embargo expired.
The author's closing note: "Over the past few years I have reported and patched some 70 Linux kernel vulnerabilities, and this was the most pleasant experience among those contributions."
The reporter wrote the patch. The maintainers reviewed it the same week. The exploit was held for the embargo and dropped on the day the embargo lifted. The locking gap the commit message named is still in the code.
PoC: V4bel/ITScape
The commit message names three callers that do not exclude one another. The patch does not make them exclude one another.