blob: 6327e82ad49bfac8db9dbf0d07ccad3bca877de5 [file] [log] [blame]
From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: <linux-cve-announce@vger.kernel.org>
Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: CVE-2024-53135: KVM: VMX: Bury Intel PT virtualization (guest/host mode) behind CONFIG_BROKEN
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
KVM: VMX: Bury Intel PT virtualization (guest/host mode) behind CONFIG_BROKEN
Hide KVM's pt_mode module param behind CONFIG_BROKEN, 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) RTIT_CTL if tracing
is enabled (enforced via a VMX consistency check). Per the SDM:
If the logical processor is operating with Intel PT enabled (if
IA32_RTIT_CTL.TraceEn = 1) at the time of VM entry, the "load
IA32_RTIT_CTL" 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.
The Linux kernel CVE team has assigned CVE-2024-53135 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.0 with commit f99e3daf94ff35dd4a878d32ff66e1fd35223ad6 and fixed in 5.4.287 with commit c3742319d021f5aa3a0a8c828485fee14753f6de
Issue introduced in 5.0 with commit f99e3daf94ff35dd4a878d32ff66e1fd35223ad6 and fixed in 5.10.231 with commit d4b42f926adcce4e5ec193c714afd9d37bba8e5b
Issue introduced in 5.0 with commit f99e3daf94ff35dd4a878d32ff66e1fd35223ad6 and fixed in 5.15.174 with commit b8a1d572478b6f239061ee9578b2451bf2f021c2
Issue introduced in 5.0 with commit f99e3daf94ff35dd4a878d32ff66e1fd35223ad6 and fixed in 6.1.119 with commit e6716f4230a8784957273ddd27326264b27b9313
Issue introduced in 5.0 with commit f99e3daf94ff35dd4a878d32ff66e1fd35223ad6 and fixed in 6.6.63 with commit d28b059ee4779b5102c5da6e929762520510e406
Issue introduced in 5.0 with commit f99e3daf94ff35dd4a878d32ff66e1fd35223ad6 and fixed in 6.11.10 with commit b91bb0ce5cd7005b376eac690ec664c1b56372ec
Issue introduced in 5.0 with commit f99e3daf94ff35dd4a878d32ff66e1fd35223ad6 and fixed in 6.12 with commit aa0d42cacf093a6fcca872edc954f6f812926a17
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2024-53135
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
arch/x86/kvm/vmx/vmx.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/c3742319d021f5aa3a0a8c828485fee14753f6de
https://git.kernel.org/stable/c/d4b42f926adcce4e5ec193c714afd9d37bba8e5b
https://git.kernel.org/stable/c/b8a1d572478b6f239061ee9578b2451bf2f021c2
https://git.kernel.org/stable/c/e6716f4230a8784957273ddd27326264b27b9313
https://git.kernel.org/stable/c/d28b059ee4779b5102c5da6e929762520510e406
https://git.kernel.org/stable/c/b91bb0ce5cd7005b376eac690ec664c1b56372ec
https://git.kernel.org/stable/c/aa0d42cacf093a6fcca872edc954f6f812926a17