CVE-2024-53135: KVM: VMX: Bury Intel PT virtualization (guest/host mode) behind CONFIG_BROKEN
In the Linux kernel, the following vulnerability has been resolved:
KVM: VMX: Bury Intel PT virtualization (guest/host mode) behind CONFIGBROKEN
Hide KVM's ptmode module param behind CONFIGBROKEN, i.e. disable support for virtualizing Intel PT via guest/host mode unless BROKEN=y. There are myriad bugs in the implementation, some of which are fatal to the guest, and others which put the stability and health of the host at risk.
For guest fatalities, the most glaring issue is that KVM fails to ensure tracing is disabled, and stays disabled prior to VM-Enter, which is necessary as hardware disallows loading (the guest's) RTITCTL if tracing is enabled (enforced via a VMX consistency check). Per the SDM:
If the logical processor is operating with Intel PT enabled (if IA32RTITCTL.TraceEn = 1) at the time of VM entry, the "load IA32RTITCTL" VM-entry control must be 0.
On the host side, KVM doesn't validate the guest CPUID configuration provided by userspace, and even worse, uses the guest configuration to decide what MSRs to save/load at VM-Enter and VM-Exit. E.g. configuring guest CPUID to enumerate more address ranges than are supported in hardware will result in KVM trying to passthrough, save, and load non-existent MSRs, which generates a variety of WARNs, ToPA ERRORs in the host, a potential deadlock, etc.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1 - Configuration
Disable support for virtualizing Intel PT via guest/host mode unless BROKEN=y; bury KVM's pt_mode module parameter behind CONFIG_BROKEN so that Intel PT guest/host virtualization is not available by default.
Linux kernel KVM (VMX Intel PT guest/host virtualization) CONFIG_BROKEN = y - Compensating control
On the host, ensure KVM does not use guest-provided CPUID configuration to decide what MSRs to save/load at VM-Enter and VM-Exit; validate guest CPUID so KVM does not attempt to passthrough/save/load non-existent MSRs (which can generate WARNs/ToPA ERRORs and lead to potential deadlock).
Event History
Frequently Asked Questions
What is the severity of CVE-2024-53135?
CVE-2024-53135 is considered a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2024-53135?
To fix CVE-2024-53135, update your Linux kernel to a version that has resolved this vulnerability.
Which versions of the Linux kernel are affected by CVE-2024-53135?
CVE-2024-53135 affects Linux kernel versions from 5.0 to 6.1.119 and from 6.2 to 6.6.63, among others.
What does CVE-2024-53135 affect in the Linux kernel?
CVE-2024-53135 affects the KVM (Kernel-based Virtual Machine) and its handling of Intel Processor Trace (PT) virtualization.
Is there a workaround for CVE-2024-53135?
Disabling the KVM's pt_mode module parameter may serve as a temporary workaround for CVE-2024-53135 until a kernel update can be applied.