KVM: arm64: vgic-v2: Check for non-NULL vCPU in vgic_v2_parse_attr()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7d450e2821710718fd6703e9c486249cee913bab · < 6ddb4f372fc63210034b903d96ebbeb3c7195adb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KVM: arm64: vgic-v2: Check for non-NULL vCPU in vgic_v2_parse_attr()
vgic_v2_parse_attr() is responsible for finding the vCPU that matches the user-provided CPUID, which (of course) may not be valid. If the ID is invalid, kvm_get_vcpu_by_id() returns NULL, which isn't handled gracefully.
Similar to the GICv3 uaccess flow, check that kvm_get_vcpu_by_id() actually returns something and fail the ioctl if not.
From the CVE record · Linux
The Linux kernel’s KVM arm64 vgic-v2 code does not handle a missing vCPU when a caller supplies an invalid CPUID. A local caller with access to the affected ioctl can trigger a NULL-pointer dereference; the input does not specify authentication or further user-interaction requirements.
Engineers running Linux kernels with KVM arm64 vgic-v2 should check whether their kernel is affected; affected versions were not provided.