CVE-2022-48765: KVM: LAPIC: Also cancel preemption timer during SET_LAPIC
In the Linux kernel, the following vulnerability has been resolved:
KVM: LAPIC: Also cancel preemption timer during SETLAPIC
The below warning is splatting during guest reboot.
------------[ cut here ]------------ WARNING: CPU: 0 PID: 1931 at arch/x86/kvm/x86.c:10322 kvmarchvcpuioctlrun+0x874/0x880 [kvm] CPU: 0 PID: 1931 Comm: qemu-system-x86 Tainted: G I 5.17.0-rc1+ #5 RIP: 0010:kvmarchvcpuioctlrun+0x874/0x880 [kvm] Call Trace: <TASK> kvmvcpuioctl+0x279/0x710 [kvm] x64sysioctl+0x83/0xb0 dosyscall64+0x3b/0xc0 entrySYSCALL64afterhwframe+0x44/0xae RIP: 0033:0x7fd39797350b
This can be triggered by not exposing tsc-deadline mode and doing a reboot in the guest. The lapicshutdown() function which is called in sysreboot path will not disarm the flying timer, it just masks LVTT. lapicshutdown() clears APIC state w/ LVTMASKED and timer-mode bit is 0, this can trigger timer-mode switch between tsc-deadline and oneshot/periodic, which can result in preemption timer be cancelled in apicupdatelvtt(). However, We can't depend on this when not exposing tsc-deadline mode and oneshot/periodic modes emulated by preemption timer. Qemu will synchronise states around reset, let's cancel preemption timer under KVMSETLAPIC.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
KVM: LAPIC: Also cancel preemption timer during SETLAPIC
The Linux kernel CVE team has assigned CVE-2022-48765 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024062009-CVE-2022-48765-ddb8@gregkh/T
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.15.19 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.16.5 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.17 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.16.7-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 6.12.107-1Fixed in 6.12.117-1Fixed in 7.3.4-1Fixed in 7.3.5-1
Event History
Frequently Asked Questions
What is the severity of CVE-2022-48765?
CVE-2022-48765 is classified as a low-severity vulnerability in the Linux kernel affecting KVM modules.
How do I fix CVE-2022-48765?
To fix CVE-2022-48765, update your Linux kernel to the latest stable version that includes the relevant patch.
What components are affected by CVE-2022-48765?
CVE-2022-48765 affects the KVM (Kernel-based Virtual Machine) component of the Linux kernel.
What is the impact of CVE-2022-48765 on system performance?
The impact of CVE-2022-48765 may result in warnings during guest reboot, but it does not indicate a severe threat to system performance.
Is CVE-2022-48765 exploitable remotely?
CVE-2022-48765 is not considered remotely exploitable as it requires local access to the KVM environment.