KVM: arm64: vgic: Free private_irqs when init fails after allocation
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 |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KVM: arm64: vgic: Free private_irqs when init fails after allocation
Companion to commit 250f25367b58 ("KVM: arm64: Tear down vGIC on failed vCPU creation"), which added the missing kvm_vgic_vcpu_destroy() call to the kvm_share_hyp() failure path in kvm_arch_vcpu_create(). The kvm_vgic_vcpu_init() failure path immediately above it has the same shape and still needs the same cleanup.
Call kvm_vgic_vcpu_destroy() when kvm_vgic_vcpu_init() fails so private IRQs allocated before a redistributor iodev registration failure are released before the failed vCPU is freed.
From the CVE record · Linux
The Linux kernel's KVM arm64 vGIC can fail to release allocated private IRQs when vCPU initialization fails during redistributor iodev registration. This can leak resources; the input does not establish an attacker-controlled trigger or specify network access, authentication, or user-interaction requirements.
Engineers running Linux kernels with KVM on arm64 should check their kernel versions against the vendor advisory; affected versions were not provided.