Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795100061; b=OKVsfq46C3+xNVk7i50yYTG5w/qSzrInDJL6yurJBGAlduTXOgZ+MgJ1d5DVyIqQntMf M+8vx+cez9KbqThw+WKeR4cgNh2XIjp82w6TDB7nlgh9xbUCtqGvC0kVzeC7j0eYTWOTc pFX5r2gSA/bUo+dUVcTPyoWHoQp1u2Hajht3xsJKhnsS1D3F+GAhvFoKNiwyFWf6+hkwg jDubadk2ENMIrDk92ZSs5POctLmame9ARd7Qy4vgyBkStZLXBIWFEnyTS1E2j8fi83zKE D7PvnLhOGpcFJb0owlDUNDkJuYFxWIuiMrIpz3EswxJDev6nDBsCdZeR4tfIgRDlg+g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795100061; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=Kn+1qXCkhc4jd9a/q0O1GsD24thRsKjy4c9u5AYpjNA=; b=ycm8OCyUgGeHZFJ4Tjjmnl7OVZCiVy79Z2/lqL8XpG3uKE7qIIUlD+RTRQte8kex2ubC 0ktnUFZo/nF6NqHfvcsu/IXd4B3Bsyp3NoA1SWauOPcr0ZgLyJ1gECjZBl6bwFPBN5OJV zJU6S+kNigtd3oza1GPJWGUYncELH6wIzm/rsC2lSBkzbqw1o1vQGUOfbk8zWJ9O/HfhN suAB1Wra53X5zWG6ICLX0Ur3+tj3C6U3mVVgjHKt1+o5/KhzoA+UGwGYGcT4Kb+KdWO0O eYRvz1VKa+QWtOKh+sd8vEes3NsTQhuaYvGmdY3NOzAOrXSPJKlnBqJOK/vvHNsYKYA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=1h6EIFrq; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7058D606A320 for ; Thu, 19 Nov 2026 14:54:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=1h6EIFrq Received: by smtp.kernel.org (Postfix) with ESMTPSA id B41D81F000C4; Thu, 19 Nov 2026 14:54:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795100061; bh=Kn+1qXCkhc4jd9a/q0O1GsD24thRsKjy4c9u5AYpjNA=; h=From:To:Cc:Subject:Date:Reply-To; b=1h6EIFrqAHX77bnEuINAoKuCiZfeZ/Lo7MvoUfqxVPktRX7AoKM6SjPU7Ekpt+Vjx 1cC0b2dUcyr9IExjogeXo+iXYOr6cnWhXvNa1fqtt3gSbkfHjg6tCyeLveteJ+vUXM Zyd3FRgah7acSYlZEGdRuB4EFaYyT1omEz008lfc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99472: KVM: pfncache: use a dedicated invalidation sequence for cache refresh Date: Thu, 19 Nov 2026 15:26:10 +0100 Message-ID: <2026111911-CVE-2026-99472-deb1@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4226; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Zrd3OGX0tXC8X6HzZwfF8TRD5aSn3I/43fIXuXVM+8Y=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/2bp9mt4xXhPoceB/3bh+I9ebMpc9k/m3HXj8Qnyy/ UrOCTdPdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBETEMZ5ju53ou6nZv6RDrZ n19A4tOXw8YBjQwLbnRPy/ap/ZxUKnx6bZWpptjHYp4eAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: KVM: pfncache: use a dedicated invalidation sequence for cache refresh The gfn_to_pfn_cache refresh path guards against mmu notifier invalidations which complete while it has dropped gpc->lock for the HVA->PFN lookup: hva_to_pfn_retry() samples kvm->mmu_invalidate_seq and retries if it changed, or if mn_active_invalidate_count is still elevated. That is insufficient for HVA-based caches. mmu_invalidate_seq is only advanced by kvm_mmu_invalidate_end() when the invalidated range overlaps a memslot, and an HVA-based cache (e.g. the Xen shared_info page mapped with KVM_XEN_ATTR_TYPE_SHARED_INFO_HVA) need not be backed by any memslot at all. An invalidation of the cached HVA which starts and ends entirely within the lookup window is thus invisible to the retry check: mn_active_invalidate_count is back to zero and the sequence never moved. The refresh then publishes a mapping of a page which has already been freed, and the next reader dereferences it: BUG: KASAN: use-after-free in kvm_xen_shared_info_init+0x3c6/0x440 Read of size 4 at addr ffff8880599c2900 by task syz.2.383/7257 Since gfn_to_pfn_cache_invalidate_start() deliberately skips caches which are not currently valid (including one whose refresh is in progress, as the refresh clears the valid flag before dropping the lock), the retry check is the only line of defence, and it must fire for *any* invalidation, not just those hitting a memslot. Add a dedicated kvm->gpc_invalidate_seq, incremented by every kvm_mmu_notifier_invalidate_range_end() under mn_invalidate_lock before mn_active_invalidate_count is decremented, and check it in hva_to_pfn_retry() instead of mmu_invalidate_seq. Incrementing in range_end() in the same critical section as the in-progress count also closes the variant where the cache is activated with the contested HVA only after invalidate_range_start() has run. The same bug is also reachable through the per-vCPU vcpu_info cache (KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO_HVA), where the stale mapping is then dereferenced by kvm_setup_guest_pvclock() on the next KVM_RUN: BUG: KASAN: use-after-free in kvm_setup_guest_pvclock+0x5bf/0x660 This intentionally makes refresh retry on *unrelated* mmu notifier events; restoring precision (and reworking the GPC locking more generally) is left for a subsequent series. Reproducers: https://david.woodhou.se/xen_shinfo_race.c https://david.woodhou.se/vcpu_info_race.c The Linux kernel CVE team has assigned CVE-2026-99472 to this issue. Affected and fixed versions =========================== Issue introduced in 6.9 with commit b9220d32799a62c634f7b0b3618da52772626952 and fixed in 7.3.2 with commit fabc002f6396202b5ad7ad4ceec24d27aad90f3f Issue introduced in 6.9 with commit b9220d32799a62c634f7b0b3618da52772626952 and fixed in 7.4-rc1 with commit da260bcb56feeb6489a83f310308453a0a7de25e 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-99472 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: include/linux/kvm_host.h virt/kvm/kvm_main.c virt/kvm/pfncache.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/fabc002f6396202b5ad7ad4ceec24d27aad90f3f https://git.kernel.org/stable/c/da260bcb56feeb6489a83f310308453a0a7de25e