KVM: arm64: nv: Avoid dereferencing NULL VNCR pseudo-TLB
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.397.1.47.2In the Linux kernel, the following vulnerability has been resolved:
KVM: arm64: nv: Avoid dereferencing NULL VNCR pseudo-TLB
VNCR TLB invalidation occurs from MMU notifiers or TLBI instructions, and either can race against a vcpu not being onlined yet (no pseudo-TLB allocated). Similarly, the TLB might be invalid, and the invalidation should be skipped in this case.
Both kvm_invalidate_vncr_ipa() and kvm_invalidate_vncr_va() are expected to perform the same checks, except that the latter doesn't check for the allocation and blindly dereferences the pointer.
Solve this by introducing a new iterator built on top of the usual kvm_for_each_vcpu() that checks for both of the above conditions, and convert the two users to it.
From the CVE record · Linux
The Linux kernel's KVM arm64 VNCR invalidation path can dereference a NULL pseudo-TLB pointer. An invalidation from an MMU notifier or TLBI instruction can race with a vCPU that has not been onlined, before its pseudo-TLB is allocated. The input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with KVM on arm64 should check whether their kernel is affected; affected versions are not specified.