CVE-2026-98164: KVM: x86/mmu: Check write tracking in all address spaces
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
KVM: x86/mmu: Check write tracking in all address spaces
kvm_gfn_is_write_tracked() checks only the supplied memslot, but page tracking is per-address-space and shadow pages are shared across all address spaces. With SMM, a GFN can therefore be write-tracked in one address space and appear untracked through the other.
Check the supplied slot first, then the slot for the other address space. This ensures all callers honor write tracking regardless of the active address space. In particular, it prevents mmu_try_to_unsync_pages() from marking an upper-level shadow page unsync and eventually triggering the BUG in pte_list_remove().
[invert direction of the conditional. - Paolo]
The Linux kernel CVE team has assigned CVE-2026-98164 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.2 with commit 699023e239658e62da6f42f47d31b54788521ec1 and fixed in 6.1.187 with commit 09aa68552d2542cc6c23edd1568ac265dc5d886f Issue introduced in 4.2 with commit 699023e239658e62da6f42f47d31b54788521ec1 and fixed in 6.6.156 with commit 429b6f43b4d8c98988fdca99e02dc156134e3d77 Issue introduced in 4.2 with commit 699023e239658e62da6f42f47d31b54788521ec1 and fixed in 6.12.108 with commit d8636c8f9f95d0fd1e2f6f1cad0d5757aa6f212a Issue introduced in 4.2 with commit 699023e239658e62da6f42f47d31b54788521ec1 and fixed in 6.18.49 with commit c0a9bd5fca0b5f2dea32b0fc31350e71e8648112 Issue introduced in 4.2 with commit 699023e239658e62da6f42f47d31b54788521ec1 and fixed in 7.1.13 with commit ec8fcaf354c1cbb36755d48e9f5a00c9591349e5 Issue introduced in 4.2 with commit 699023e239658e62da6f42f47d31b54788521ec1 and fixed in 7.2 with commit 0f38453cdb2e17566ccb7c0f3dabd5bd21caca26
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-98164
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/mmu/page_track.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/09aa68552d2542cc6c23edd1568ac265dc5d886f https://git.kernel.org/stable/c/429b6f43b4d8c98988fdca99e02dc156134e3d77 https://git.kernel.org/stable/c/d8636c8f9f95d0fd1e2f6f1cad0d5757aa6f212a https://git.kernel.org/stable/c/c0a9bd5fca0b5f2dea32b0fc31350e71e8648112 https://git.kernel.org/stable/c/ec8fcaf354c1cbb36755d48e9f5a00c9591349e5 https://git.kernel.org/stable/c/0f38453cdb2e17566ccb7c0f3dabd5bd21caca26