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=1795154187; b=jkyUGcqGs1MhjixVmZvSZPDoDeTQj7BxJWoNV3Jdw9EkBrKAkhovwROMdmeltvDT3Y4X k4U7vEbeT42JTsSHc1cpJKsp0hnMv76ysBJ7K9eSMkZzPRidhIbhQHZ8h6xM6bdh+qnuY VNlZ5X8PfG/h9atRD/8oOz7v0M05Cpr0d0CefT2VSUgFnsQp/u5yCnkybZ+yE2+cMPUIl o/fZsiIhwHIhXOMjKgvOlvwSypMaA8kSln6QSHcnZKWfRR+THolwDnU32y9Od0WABU720 s8MfcwaIGPoD54xTWLhIKL3tvBtpmk6Dfbf5O7FWgH+ZLznRXw6ytke4aeghOG9WJUg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795154187; 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=8ZFSochOpo4Z412wDN8qVtCXWEiVHJaXTVcuco/qBWY=; b=fUdW7MZMvGj0nPW8JZ9edCI+dq/4r9Dxoq/56vXjlS70h1dWKqO2J6Zx9RVFbZUgzaf1 1ICARdSicL8ggmn/BUYU2cg0cioxjI8jUNHHIFor9DpJ0vDZgpYE5pCFLHRZcrTMdysoi 9Y1Vwwk1qxUGalEu17ElLj4u/QVotHjv33ubhVpjSYqhoCHYSIxRx2O3GrO0mzd4zi1xA B2TmF5sKD0C3DbAEXV1CT+5J1zseh96dpBMKGegp6LZQBhCF/QksRg8J0JqpG42QXE9mC g6dKmiYhmGtbaiurPRQ0HuRat3XBg7Cg2/dPrC+/78mh/pl1yDwxytBAsdlti4mTDhA== 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=N1EGuuvR; 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 B9701606A320 for ; Fri, 20 Nov 2026 05:56:27 +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=N1EGuuvR Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13AC61F000C4; Fri, 20 Nov 2026 05:56:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795154187; bh=8ZFSochOpo4Z412wDN8qVtCXWEiVHJaXTVcuco/qBWY=; h=From:To:Cc:Subject:Date:Reply-To; b=N1EGuuvRd7F+CcoyMIlBfxUgItbRlFwEXM5g5yOfjUDM2F91X0vyS2LXW2gsG4HC/ Oqon4OuWkjsa1UEbOP614lgb/+wid0BM8TIGe1/GdnX11QAbX9npvvpsO6hAZOr7WK snpDRFcdkBkUpEx1qwmJjcRH7cCvujqvQvWcteL0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99656: mm/madvise: fix data loss from MADV_FREE on a KSM page Date: Fri, 20 Nov 2026 06:50:42 +0100 Message-ID: <2026112046-CVE-2026-99656-1573@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=2907; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=gu2tZeC72bB1zZqjOP8BvagiYKTvUCDxViiStZhE+UU=; b=kA0DAAIRMUfUDdst+ykByyZiAGr/33qi3/7M52eYGYEd+U5WL+TjFrcGHr8sqsn347BU3mpES 4hdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmr/33oACgkQMUfUDdst+ykB7QCdEsyV iaOw19pJkJPffLC47/iQ9LoAnRC+RTIWi1AeRTjfyFRz1C/qP5aL 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/madvise: fix data loss from MADV_FREE on a KSM page MADV_FREE can clear the dirty flag of a singly mapped KSM folio. The folio remains in the stable tree and can gain new mappings without being dirtied again. Once marked lazyfree, reclaim can discard data that those mappings still need. KSM always marks a folio dirty when converting it to a KSM folio in try_to_merge_one_page(). Marking a folio lazyfree clears PG_swapbacked but leaves PG_dirty unchanged. Preserving PG_dirty makes reclaim restore PG_swapbacked instead of discarding the folio. This also protects folios that were already lazyfree when KSM converted them. Skip KSM folios before clearing their dirty flag, checking under the folio lock to serialize with KSM conversion. The Linux kernel CVE team has assigned CVE-2026-99656 to this issue. Affected and fixed versions =========================== Issue introduced in 4.5 with commit 854e9ed09dedf0c19ac8640e91bcc74bc3f9e5c9 and fixed in 6.12.118 with commit af2feafb0437fab5ed9d02eeb1c06ef66e05c55a Issue introduced in 4.5 with commit 854e9ed09dedf0c19ac8640e91bcc74bc3f9e5c9 and fixed in 6.18.64 with commit 8b6860f17b4de23a0b19045c066dc0679e50f0ba Issue introduced in 4.5 with commit 854e9ed09dedf0c19ac8640e91bcc74bc3f9e5c9 and fixed in 7.3.5 with commit 64f273b71bf714dd22b803a87d65bb40faaffcad Issue introduced in 4.5 with commit 854e9ed09dedf0c19ac8640e91bcc74bc3f9e5c9 and fixed in 7.4-rc2 with commit 22d043c1da48d6c7274f9dd900714b6d58b7b9c6 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-99656 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/madvise.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/af2feafb0437fab5ed9d02eeb1c06ef66e05c55a https://git.kernel.org/stable/c/8b6860f17b4de23a0b19045c066dc0679e50f0ba https://git.kernel.org/stable/c/64f273b71bf714dd22b803a87d65bb40faaffcad https://git.kernel.org/stable/c/22d043c1da48d6c7274f9dd900714b6d58b7b9c6