Linux
KVM: arm64: Make VNCR invalidation participate in MMU invalidation retry
In the Linux kernel, the following vulnerability has been resolved: KVM: arm64: Make VNCR invalidation participate in MMU invalidation retry A VNCR TLB invalidation can occur on one vcpu while another vcpu is faulting in this same page. Without correctly handling this, we can end up with the following scenario: - vcpu A walks the PTs to translate VNCR - before vcpu A is able to grab the MMU lock to insert the TLB, vcpu B updates the S1 PTs with an invalid entry, and issues a TLBI S1E2 for this VA - vcpu A inserts the TLB for something that is now invalid This isn't a new problem, and we manage S2 by having the MMU notifier to bump up mmu_invalidate_seq on invalidation so that the fault can be replayed. We can perform something similar here, and extend invalidate_vncr_va() to update the same counter, clearly indicating that the context has changed under our feet. This is safe as the invalidation always happen while holding the MMU lock for write, and that we sample the sequence number before walking S1.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 4ffa72ad8f37e73bbb6c0baa88557bcb4fd39929, < d8580e7aa189b0c6c5bb4d94b8352728a7c35bbd
- >= 4ffa72ad8f37e73bbb6c0baa88557bcb4fd39929, < 11ee3faab4f1755d126bead9f882e75a7a677860
- >= 4ffa72ad8f37e73bbb6c0baa88557bcb4fd39929, < 2b7324f3a0c1072b9d578b8d42f199506753f26e
Fixed in d8580e7aa189b0c6c5bb4d94b8352728a7c35bbd, 11ee3faab4f1755d126bead9f882e75a7a677860, 2b7324f3a0c1072b9d578b8d42f199506753f26e
- 6.16
Fixed in 0, 6.18.51, 7.2.5, 7.3
Mitigation
Upgrade Linux to d8580e7aa189b0c6c5bb4d94b8352728a7c35bbd or 11ee3faab4f1755d126bead9f882e75a7a677860 or 2b7324f3a0c1072b9d578b8d42f199506753f26e or later.
Upgrade Linux to 0 or 6.18.51 or 7.2.5 or 7.3 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.