Skip to contentSkip to conversation

CVE-2026-46014: KVM: SVM: Add missing save/restore handling of LBR MSRs

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

KVM: SVM: Add missing save/restore handling of LBR MSRs

MSR_IA32_DEBUGCTLMSR and LBR MSRs are currently not enumerated by KVM_GET_MSR_INDEX_LIST, and LBR MSRs cannot be set with KVM_SET_MSRS. So save/restore is completely broken.

Fix it by adding the MSRs to msrs_to_save_base, and allowing writes to LBR MSRs from userspace only (as they are read-only MSRs) if LBR virtualization is enabled. Additionally, to correctly restore L1's LBRs while L2 is running, make sure the LBRs are copied from the captured VMCB01 save area in svm_copy_vmrun_state().

Note, for VMX, this also fixes a flaw where MSR_IA32_DEBUGCTLMSR isn't reported as an MSR to save/restore.

Note #2, over-reporting MSR_IA32_LASTxxx on Intel is ok, as KVM already handles unsupported reads and writes thanks to commit b5e2fec0ebc3 ("KVM:
Ignore DEBUGCTL MSRs with no effect") (kvm_do_msr_access() will morph the unsupported userspace write into a nop).

[sean: guard with lbrv checks, massage changelog]

The Linux kernel CVE team has assigned CVE-2026-46014 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.26 with commit 24e09cbf480a72f9c952af4ca77b159503dca44b and fixed in 6.18.27 with commit 2b922a42b531a82d7881add14a7698dcdc5e1f0a
	Issue introduced in 2.6.26 with commit 24e09cbf480a72f9c952af4ca77b159503dca44b and fixed in 7.0.4 with commit 13a89ada5dcfc2539514c83ba5a2c61157f1ec6c
	Issue introduced in 2.6.26 with commit 24e09cbf480a72f9c952af4ca77b159503dca44b and fixed in 7.1-rc1 with commit 3700f0788da6acf73b2df56690f4b201aa4aefd2

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-2026-46014

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/svm/nested.c
	arch/x86/kvm/svm/svm.c
	arch/x86/kvm/x86.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/2b922a42b531a82d7881add14a7698dcdc5e1f0a
	https://git.kernel.org/stable/c/13a89ada5dcfc2539514c83ba5a2c61157f1ec6c
	https://git.kernel.org/stable/c/3700f0788da6acf73b2df56690f4b201aa4aefd2