Linux
KVM: arm64: vgic: Handle race between interrupt affinity change and LPI disabling
In the Linux kernel, the following vulnerability has been resolved: KVM: arm64: vgic: Handle race between interrupt affinity change and LPI disabling Hyunwoo Kim reports some really bad races should the following situation occur: - LPI-I is pending in vcpu-B's AP list - vcpu-A writes to vcpu-B's RD to disable its LPIs - vcpu-C moves I from B to C If the last two race nicely enough, vgic_prune_ap_list() can drop the irq and AP list locks, reacquire them, and in the interval the irq has been freed. UAF follows. The fix is two-fold: - Before dropping the irq and ap_list locks, take a reference on the irq - Do not try to handle migration of the pending bit: there is no expectation that this state is retained, as per the architecture With that, we're sure that the interrupt is still around, and we safely remove it from the AP list as it has no target at this stage (unless another interrupt fires, but that's another story).
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 5dd4b924e390af426e424d5e52c1b4d1566af817, < 7328cff91703ac4e93c200b20cebaa36d2f314ed
- >= 5dd4b924e390af426e424d5e52c1b4d1566af817, < eb74f3feb68e64cf69f86cb806a15d8cfb6757f4
- >= 5dd4b924e390af426e424d5e52c1b4d1566af817, < 77c61235d66246dd6a5f55587f0afc273d832775
- >= 5dd4b924e390af426e424d5e52c1b4d1566af817, < d19dca8194ebed371e624331c6be2cb73b562caf
- >= 5dd4b924e390af426e424d5e52c1b4d1566af817, < b1a89d12d35a8256d2b170ced0b1c86851f3def2
- >= 5dd4b924e390af426e424d5e52c1b4d1566af817, < 7258770e5814f15e8308ebda82ac9acf6964ba8e
Fixed in 7328cff91703ac4e93c200b20cebaa36d2f314ed, eb74f3feb68e64cf69f86cb806a15d8cfb6757f4, 77c61235d66246dd6a5f55587f0afc273d832775, d19dca8194ebed371e624331c6be2cb73b562caf, b1a89d12d35a8256d2b170ced0b1c86851f3def2, 7258770e5814f15e8308ebda82ac9acf6964ba8e
- 4.8
Fixed in 0, 6.1.191, 6.6.160, 6.12.114, 6.18.40, 7.1.5, 7.2
Mitigation
Upgrade Linux to 7328cff91703ac4e93c200b20cebaa36d2f314ed or eb74f3feb68e64cf69f86cb806a15d8cfb6757f4 or 77c61235d66246dd6a5f55587f0afc273d832775 or d19dca8194ebed371e624331c6be2cb73b562caf or b1a89d12d35a8256d2b170ced0b1c86851f3def2 or 7258770e5814f15e8308ebda82ac9acf6964ba8e or later.
Upgrade Linux to 0 or 6.1.191 or 6.6.160 or 6.12.114 or 6.18.40 or 7.1.5 or 7.2 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.