Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E8031BD014 for ; Wed, 4 Dec 2024 14:21:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733322108; cv=none; b=na1M8m7vov/OMLBad2e5HxgLYWJANrlie2ajuYffBzgyJbDM+jlLDdJCdoirKqg+BD6NEn0vSkwLc2ZCyilXYWJujN2vOqAkO91euEzDpgLZGkrRDBbttLc2o6X0bMjYwvzGQVowfb8Cku8EWF3p3qVGDgrp7uPacuEUrcmH7yg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733322108; c=relaxed/simple; bh=yHF0fkNRFW2trKjWGxQp4oIwB+kevUAMt9oLrpAGWl8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nUAkUDCTlphIB+Iqq5n9R2j+W6cLETfqJ98HchJVfTVy/VKV6w29QaznWZsQ8Bo9FBaMYzVX3NIb0f49ycMPgSIDGpLnxKzdYk6WubF4jw4DPbK/TvlHTV4BSH33T2n7fdVKiQBd/1RkfgY+LAVJJb8NQtYiZ9cK5VSItJ480Xc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eNeDgxGv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eNeDgxGv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46710C4CECD; Wed, 4 Dec 2024 14:21:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1733322107; bh=yHF0fkNRFW2trKjWGxQp4oIwB+kevUAMt9oLrpAGWl8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=eNeDgxGvJwd56FQDt66rs0ak+WDw/fb6m5hRrcInSWabN9QBomfA0XHTRs3kkIo0M g2uabvj33t3R+IwpXZkwQ8GCIHQIbwj41yhTgsagFfFM4SOXK3hkYLiZUujV98gIGP sA18HoT9FQ3s2HSbZzlDyPySrp9xdnOAbqNRFZIE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53135: KVM: VMX: Bury Intel PT virtualization (guest/host mode) behind CONFIG_BROKEN Date: Wed, 4 Dec 2024 15:20:58 +0100 Message-ID: <2024120451-CVE-2024-53135-8dcc@gregkh> X-Mailer: git-send-email 2.47.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3234; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=yHF0fkNRFW2trKjWGxQp4oIwB+kevUAMt9oLrpAGWl8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkBqc7tjfX1bNslF7Bdk4z12rjv3l7F3vbi7uNRerzyz XUnmqd3xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwERELzEsaODuFbKUCVIv3ihs JRf7xdL///NIhvm+PmW6k44vbE1kTn/z6BvLpX+ON98BAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit 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 f99e3daf94ff and fixed in 6.1.119 with commit e6716f4230a8 Issue introduced in 5.0 with commit f99e3daf94ff and fixed in 6.6.63 with commit d28b059ee477 Issue introduced in 5.0 with commit f99e3daf94ff and fixed in 6.11.10 with commit b91bb0ce5cd7 Issue introduced in 5.0 with commit f99e3daf94ff and fixed in 6.12 with commit aa0d42cacf09 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/e6716f4230a8784957273ddd27326264b27b9313 https://git.kernel.org/stable/c/d28b059ee4779b5102c5da6e929762520510e406 https://git.kernel.org/stable/c/b91bb0ce5cd7005b376eac690ec664c1b56372ec https://git.kernel.org/stable/c/aa0d42cacf093a6fcca872edc954f6f812926a17