CVE-2026-72239: x86/virt/sev: Revert "Drop WBINVD before setting MSR_AMD64_SYSCFG_SNP_EN"
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
x86/virt/sev: Revert "Drop WBINVD before setting MSR_AMD64_SYSCFG_SNP_EN"
Revert
99cf1fb58e68 ("x86/virt/sev: Drop WBINVD before setting MSR_AMD64_SYSCFG_SNP_EN").
Section 8.8 of the SNP spec says:
Before invoking SNP_INIT_EX with INIT_RMP set to 1, software must ensure that no CPUs contain dirty cache lines for the memory containing the RMP.
Cachelines can be moved from cache to cache in a dirty state. The wbinvd_on_all_cpus() before SNP_INIT_EX flushes the caches for each CPU, but if the IPIs for WBINVD race with this dirty cacheline movement, it is possible that they may not get flushed, violating the firmware requirement.
Doing wbinvd_on_all_cpus() before setting SNPEn is safer since the RMP table is not yet in use.
[ Heroically bisected by Srikanth. ]
[ bp: Massage commit message. ]
The Linux kernel CVE team has assigned CVE-2026-72239 to this issue.
Affected and fixed versions
===========================
Issue introduced in 7.1 with commit 99cf1fb58e68291d408b4c4484181cf88f081857 and fixed in 7.1.5 with commit e5158ff53fdff9c229bf13aa5f75eb17cdcfcd2d Issue introduced in 7.1 with commit 99cf1fb58e68291d408b4c4484181cf88f081857 and fixed in 7.2-rc3 with commit 4c2509f3b79756679a02bea649c6a7501b58f52c
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-72239
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/virt/svm/sev.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/e5158ff53fdff9c229bf13aa5f75eb17cdcfcd2d https://git.kernel.org/stable/c/4c2509f3b79756679a02bea649c6a7501b58f52c