Linux
KVM: arm64: Correctly handle end of VA space TLBI invalidation
In the Linux kernel, the following vulnerability has been resolved: KVM: arm64: Correctly handle end of VA space TLBI invalidation Our TLB invalidation by VA code is based on comparing two ranges, one defined by the TLB, and one defined by the TLBI instruction. Each range is defined by a start and a size. However, the way the comparison is done doesn't account for address rollover, as it compares an address with (base + size). This works nicely until this expression represent the last page/block in the TTBR1 VA space, as the result is a big fat 0. And a failed TLB invalidation. Rewrite the comparison in a way that is immune to the address rollover (making the end address inclusive instead of exclusive), and move this into a common helper that is used by both VA and IPA invalidations, as suggested by Hyunwoo Kim (although the IPA version didn't suffer from this particular problem, obviously).
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 4ffa72ad8f37e73bbb6c0baa88557bcb4fd39929, < ce447651a52ec077694172af10c4fffb11f56c43
- >= 4ffa72ad8f37e73bbb6c0baa88557bcb4fd39929, < c624731ca6fe59ad8909ce4108301aa7560a91d6
- >= 4ffa72ad8f37e73bbb6c0baa88557bcb4fd39929, < 34af2c3e31f91a739dc175459fdbd99ed952b457
Fixed in ce447651a52ec077694172af10c4fffb11f56c43, c624731ca6fe59ad8909ce4108301aa7560a91d6, 34af2c3e31f91a739dc175459fdbd99ed952b457
- 6.16
Fixed in 0, 6.18.51, 7.2.5, 7.3
Mitigation
Upgrade Linux to ce447651a52ec077694172af10c4fffb11f56c43 or c624731ca6fe59ad8909ce4108301aa7560a91d6 or 34af2c3e31f91a739dc175459fdbd99ed952b457 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.