CVE-2026-143077: LoongArch: KVM: Clear device pointer in irqchip destroy callbacks
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: KVM: Clear device pointer in irqchip destroy callbacks
The destroy callbacks of the four irqchip devices free the device structure without clearing kvm->arch.{ipi,eiointc,pchpic,dmsintc}, leaving a dangling pointer. ops->destroy() is not only called at VM teardown but also when KVMCREATEDEVICE succeeds and the following anoninodegetfd() fails (e.g. under RLIMITNOFILE); the VM stays alive, kvmarchirqchipinkernel() still reports true, and interrupt injection dereferences the freed device.
Clear the pointer when destroying.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the four LoongArch KVM irqchip device destroy callbacks, clear the corresponding kvm->arch pointer (ipi, eiointc, pch_pic, or dmsintc) when destroying the device.
Event History
Frequently Asked Questions
Under what conditions can this issue be triggered?
It can occur when creation of one of the LoongArch KVM irqchip devices succeeds but the subsequent anon_inode_getfd() call fails. The description gives exhaustion of the process file-descriptor limit (RLIMIT_NOFILE) as an example.
What systems or workloads are exposed?
Exposure is limited to Linux kernel KVM use on LoongArch involving the affected in-kernel irqchip devices: ipi, eiointc, pch_pic, or dmsintc. A VM can remain running after the failed device-creation path, with KVM still treating an irqchip as present.
What happens after the failed device creation?
The device structure is freed, but its corresponding kvm->arch device pointer remains dangling. Later interrupt injection can dereference that freed device.
How can administrators reduce risk before applying a fix?
Avoid conditions that cause anon_inode_getfd() to fail during KVM device creation, including file-descriptor exhaustion under RLIMIT_NOFILE. Monitor and maintain sufficient file-descriptor headroom for processes creating KVM devices.