Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2804B239E80 for ; Wed, 16 Sep 2026 10:40:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789555240; cv=none; b=tv4Pcd5Ts5zXvy7SSiZo9XPOxauRBVE75/LDucmxq5olLTTW+3XkwQnu5GINvT/OHCOG/U4uMZH4DIRTJa3WGU4KgKtxy3/r4AxFIONqZJhWuPPgBlgLZuz3si+356KIx2dzrsFcvpZ6z7llE5U66bVz/jmZu+407KNj8IhSIbM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789555240; c=relaxed/simple; bh=9ieOLd0wIcg5MECi3OrUgRMpWN4oxv8EfKoxDvRLstE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IUmnd7RlRcj1UVxIzVK9xOzuxCIVA7js7NCluw2jDZhTg4MOnRTiahqU95IYpgQvxaqEZnoEE4lwbmc6ZBhRzV6zSkExREY3iNHIwwZr37otqE5tGmIt49sDThelnJYpHVXbyUIjCpmnTOCjPI+T6gEUtG37LXIhFeetN3klkjU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=17rh/0x0; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="17rh/0x0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E65CF1F0089A; Wed, 16 Sep 2026 10:40:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789555220; bh=64/YYxI4EymZjHJDo753yLqPGDAWwlxQybhN+/Sx2eU=; h=From:To:Cc:Subject:Date:Reply-To; b=17rh/0x0nijI2ALi2spwBKEWszaJ7zlmonXTRtyp3UCzYy2oizKrOM400AqS4Tehk OKjejy2PpnRvlTHkskWKD7C4CzYtgVU3twolFSTQ6/ORR5nIUEajRz/Bu+VKj78GmY VgSVERxnngbfYwn/Nc1APg2n8s/Snyb2mHkPJEkM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89928: KVM: x86/mmu: Consume the locked rmap value in the lockless rmap walk Date: Wed, 16 Sep 2026 11:30:58 +0100 Message-ID: <2026091644-CVE-2026-89928-4768@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4283; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=oZUyrhERClnvMTYdzIbV/snSeqEgdixwM0c9FAFXtuM=; b=owGbwMvMwCRo6H6F97bub03G02pJDFmr8mdc2r7nR3DYipY9Rj+L1r94LV6UHzCzimdH5YvHL pMyb95t6YhlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJnJFjWNCy6cFszsuzzh8+ s+upXN5Fd8nPvfcZ5vCvuSXmKKXwIMF0RsMOtV/T5J62SgAA 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: x86/mmu: Consume the locked rmap value in the lockless rmap walk __kvm_rmap_lock() deliberately elides the rmap lock when it observes an empty rmap. In that case kvm_rmap_lock_readonly() also re-enables preemption and returns zero, so the caller holds neither the rmap lock nor a preemption reference. The elision documents the invariant it relies on: * Elide the lock if the rmap is empty, as lockless walkers (read-only * mode) don't need to (and can't) walk an empty rmap, nor can they add * entries to the rmap. I.e. the only paths that process empty rmaps * do so while holding mmu_lock for write, and are mutually exclusive. kvm_rmap_age_gfn_range() ignores the returned value and unconditionally enters for_each_rmap_spte_lockless(). The iterator started with rmap_get_first(), which re-reads rmap_head->val rather than using the value returned by the lock. If a writer populates the rmap between the lock's read and the iterator's re-read, the aging path walks the newly installed rmap without holding its lock. For a KVM_RMAP_MANY rmap this leaves the walker following a pte_list_desc chain that it never locked. A writer holding mmu_lock for write may free that chain (e.g. kvm_zap_all_rmap_sptes() on the recycle path, or any rmap zap) via kmem_cache_free() while the walk is in progress, giving a slab use-after-free. Nothing serialises the two: the aging path runs without mmu_lock when CONFIG_KVM_MMU_LOCKLESS_AGING=y, and the rmap lock that would otherwise exclude the writer was elided. Because the empty path re-enables preemption, the interval between the two reads can span an arbitrary scheduling delay. Fix the class of bug by having the lockless walk consume the value returned by the lock instead of re-reading the rmap. Split rmap_get_first() into __rmap_get_first(), which starts an iterator from an already-read rmap value, and make for_each_rmap_spte_lockless() take that value and call __rmap_get_first() directly. kvm_rmap_age_gfn_range() passes the value returned by kvm_rmap_lock_readonly(): when the lock was elided the value is zero, __rmap_get_first() returns NULL, and the walk is skipped. No lockless walker re-reads the rmap, so the lock-elision invariant cannot be violated, and no lock()-without-paired-unlock() path is added to the aging code. The Linux kernel CVE team has assigned CVE-2026-89928 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit af3b6a9eba48419732b07a0472db7160282f0f39 and fixed in 6.18.51 with commit 41debfc98526c0a95c41a62435aca0a70340a26d Issue introduced in 6.15 with commit af3b6a9eba48419732b07a0472db7160282f0f39 and fixed in 7.2.5 with commit 8edb3c09e43f7cd8a5dfd291c6e0fc9c74d4621d Issue introduced in 6.15 with commit af3b6a9eba48419732b07a0472db7160282f0f39 and fixed in 7.3-rc1 with commit e428f9779a43737d830111238816f1928b07aefb 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-89928 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/mmu.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/41debfc98526c0a95c41a62435aca0a70340a26d https://git.kernel.org/stable/c/8edb3c09e43f7cd8a5dfd291c6e0fc9c74d4621d https://git.kernel.org/stable/c/e428f9779a43737d830111238816f1928b07aefb