Linux
KVM: arm64: vgic: Check the interrupt is still ours before migrating it
In the Linux kernel, the following vulnerability has been resolved: KVM: arm64: vgic: Check the interrupt is still ours before migrating it vgic_prune_ap_list() drops both ap_list_lock and irq_lock while migrating an interrupt to another vCPU. After reacquiring the locks it only checks that the affinity is unchanged (target_vcpu == vgic_target_oracle(irq)) before moving the interrupt, which assumes that an interrupt whose affinity is preserved is still queued on this vCPU's ap_list. That assumption no longer holds if the interrupt is taken off the ap_list while the locks are dropped. vgic_flush_pending_lpis() removes the interrupt from the list and sets irq->vcpu to NULL, but leaves enabled/pending/target_vcpu untouched. As the interrupt is still enabled and pending, vgic_target_oracle() returns the same target_vcpu, so the affinity check passes and list_del() is run a second time on an entry that has already been removed. Also check that the interrupt is still assigned to this vCPU (irq->vcpu == vcpu) before moving it.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 0919e84c0fc1fc73525fdcedefab89ea8460f697, < 3893e1fcf6f306b327a8358dcd1cbd077989a240
- >= 0919e84c0fc1fc73525fdcedefab89ea8460f697, < cb3efe1a354f1638726725c3ecee1ce8d1a7e2dc
- >= 0919e84c0fc1fc73525fdcedefab89ea8460f697, < da2d249a39a1881681c303ceea33f38ba1c5bbeb
- >= 0919e84c0fc1fc73525fdcedefab89ea8460f697, < 654be81c4c637af12709d47c7efc3302cd336513
- >= 0919e84c0fc1fc73525fdcedefab89ea8460f697, < e363c0bc0226dc5ea5046a88e9a6864b82c45399
- >= 0919e84c0fc1fc73525fdcedefab89ea8460f697, < 79fdd2aa774e44847cd9bb7edc811e73e3dc7bfe
- >= 0919e84c0fc1fc73525fdcedefab89ea8460f697, < 0658b09cba7fe866c6cd70cd2dcdfdcabe80328f
- >= 0919e84c0fc1fc73525fdcedefab89ea8460f697, < 0074b82cdfcb5fd13710a0ac308ade68ac6f6fbe
Fixed in 3893e1fcf6f306b327a8358dcd1cbd077989a240, cb3efe1a354f1638726725c3ecee1ce8d1a7e2dc, da2d249a39a1881681c303ceea33f38ba1c5bbeb, 654be81c4c637af12709d47c7efc3302cd336513, e363c0bc0226dc5ea5046a88e9a6864b82c45399, 79fdd2aa774e44847cd9bb7edc811e73e3dc7bfe, 0658b09cba7fe866c6cd70cd2dcdfdcabe80328f, 0074b82cdfcb5fd13710a0ac308ade68ac6f6fbe
- 4.7
Fixed in 0, 5.10.261, 5.15.212, 6.1.178, 6.6.145, 6.12.97, 6.18.40, 7.1.5, 7.2
Mitigation
Upgrade Linux to 3893e1fcf6f306b327a8358dcd1cbd077989a240 or cb3efe1a354f1638726725c3ecee1ce8d1a7e2dc or da2d249a39a1881681c303ceea33f38ba1c5bbeb or 654be81c4c637af12709d47c7efc3302cd336513 or e363c0bc0226dc5ea5046a88e9a6864b82c45399 or 79fdd2aa774e44847cd9bb7edc811e73e3dc7bfe or 0658b09cba7fe866c6cd70cd2dcdfdcabe80328f or 0074b82cdfcb5fd13710a0ac308ade68ac6f6fbe or later.
Upgrade Linux to 0 or 5.10.261 or 5.15.212 or 6.1.178 or 6.6.145 or 6.12.97 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.