From mboxrd@z Thu Jan 1 00:00:00 1970 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=1795154171; b=HKlUpIENAbr9CNSQHI9q9gbgC4WqbTHu0tFxD405Y69sstUTF4JmCvaurD7Ka0Z8vHY8 3I9lvCb5HZ8mXEU96HEcseCCWthZMKpjoJVih/zoqkFr7l3JPLR38pF+MG9uH3eu/ipiW odb3hMI8+zxRx1tlmkFCZtwLmPcPqklb66b30OIHZeSsdfu76KHZVBlYQB1Y5hnQrnMis Mdfsf/RzEFBiGx+oZd+Bu8jF+IlToYRLmWvsV5TREQqUOwT3PTYsJ08kovSe7T83YSxwF uWeFiKoMLBm/fJHMdeRbicOI+SyEWeoUqz0T9WJ6nQQ0BqILu9nuqlDfiHT4I0KVZIw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795154171; 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=a5eUdMNqhjRxOZ+maSvLUXVka1cRK7sYi0wK8MKFAyc=; b=bjAvd7dEaRrGPaTvMsJM0axguGOq2loZMV4OHfe1SAdoBekHi9lad4TvyOA50sT0vydN LelNCilWFOUTG+vCncrk3B/8GU5U2vzCV+2W0YRewLRAvJie7Lvq6oA1tOa2Monb2UUA/ fI9Qab98Vg4zC+AmGZSMqdqliBjTIACb6LGmTI4GFfyr+30+vqkow53llM+VjVg/14IsY gayblcU0ZPA/jPbxSzAjDG90X0gAxus4b87h41C3tJpEmx0+4gGdFmZiM5hHiYMNrnWA6 EYErfH6tJIRdzW8ndlqRn5kik8cVNp9tLshAD6oW7Ek+EBZD6yJY/GsJYe+qwG0m+JA== 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=iHfIiYAr; 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 17020606A320 for ; Fri, 20 Nov 2026 05:56:10 +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=iHfIiYAr Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A58C1F000C4; Fri, 20 Nov 2026 05:56:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795154170; bh=a5eUdMNqhjRxOZ+maSvLUXVka1cRK7sYi0wK8MKFAyc=; h=From:To:Cc:Subject:Date:Reply-To; b=iHfIiYArXMWEp/z2Dlhz1cxlcKPInZmRTfSnDEVg+MU5BofwWLtIHCQSEBQPCMLKL rmSNtmtD58TZYEvNLeOHY9641wFPRaD1kTFeNgU5BpYrVr6dOWWlseoJtr3yOnP+qe I/tirFMKgb82R2HlXiUsGsliyeamee4fDukpO9FU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99651: mm/ksm: reset the unstable trees of all nodes Date: Fri, 20 Nov 2026 06:50:37 +0100 Message-ID: <2026112044-CVE-2026-99651-cf32@gregkh> X-Mailer: git-send-email 2.56.1 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=3089; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=v6AoGh8umeNP+Pcah+Y6JS9egBFuQGe7xCWMr9W4j2w=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/71es3cCV59d5786rk31qiid+iXFKMxgUatbXbXP0K VDa/+FXRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzES49hfuWMz1eu1tRPt/C7 6Xej2vtJoN0kV4YFJ21Lr20+bJcry+oqYBd5+q6UhV0aAA== 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: mm/ksm: reset the unstable trees of all nodes Each full scan resets ksm_nr_node_ids unstable tree roots. Enabling merge_across_nodes resets this count to 1, even if per-node roots were previously allocated. So when toggling "merge_across_nodes" 0 -> 1 -> 0, a scan that starts while the setting is 1 and continues after switching back to 0 can encounter stale unstable tree roots, resulting in UAF. Only root is allowed to change "merge_across_nodes", and the documented sequence is: "merge_across_nodes setting can be changed only when there are no ksm shared pages in the system: set run 2 to unmerge pages first, then to 1 after changing merge_across_nodes, to remerge according to the new setting." Let's fix it by tracking in ksm_nr_node_ids the actual number of allocated tree roots. remove_all_stable_nodes() and ksm_check_stable_tree() will now scan more tree roots (skipping the empty ones), which is harmless. The Linux kernel CVE team has assigned CVE-2026-99651 to this issue. Affected and fixed versions =========================== Issue introduced in 3.9 with commit ef53d16cded7f89b3843b7a96970dab897843ea5 and fixed in 6.12.118 with commit 7e5793cedeb444dc96b3b90e799d16f2f55d51b3 Issue introduced in 3.9 with commit ef53d16cded7f89b3843b7a96970dab897843ea5 and fixed in 6.18.64 with commit 1e59e96a064a6ca44e6fccb7a21f21d41614ff03 Issue introduced in 3.9 with commit ef53d16cded7f89b3843b7a96970dab897843ea5 and fixed in 7.3.5 with commit 31a2ba635adae60d23f744db2fef7ad318cdafa1 Issue introduced in 3.9 with commit ef53d16cded7f89b3843b7a96970dab897843ea5 and fixed in 7.4-rc2 with commit 890e118e95bfc2aae4432ec2a95192d6f9193211 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-99651 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: mm/ksm.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/7e5793cedeb444dc96b3b90e799d16f2f55d51b3 https://git.kernel.org/stable/c/1e59e96a064a6ca44e6fccb7a21f21d41614ff03 https://git.kernel.org/stable/c/31a2ba635adae60d23f744db2fef7ad318cdafa1 https://git.kernel.org/stable/c/890e118e95bfc2aae4432ec2a95192d6f9193211