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=1795154337; b=DqNMhh7G36OLPluJCMgCqY2e6+UtK1nSv1Lr1Og/U7fmtME8axzlt2AMIAuBHfuuosGw R8kLKMggWRtEjhB7HzSsBWp7L9DWbKIKbGCPLr6oDizXUNqfRk6FCw3PvnwMOP14rEPKp si3WF0PNelqbRjYEFR3ObwDOZtihJrV8DbibjBclW3Yc0C7Wk4ie2GsLykeTGSU7CyjPr 7mack1eEBJMIqIqFq1sljVXg8cFqmkburmYtxJZrkH4gvgaP69rKyo9isTM/K9hIme1re pDxEzq3C4WMF7FhpPs3jHmx6ASKmaGyThrNwr8KnhdUr+x+O04SJfu8ZkOPEijg6wQw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795154337; 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=LOKwVorabByOXjosdllBVLJtr8tLz5o1OYo0vwf2VC0=; b=OcTujI651wUtK3pqFNVcsjGsOhesv1ap9rV3jU43ywicrIlMYhMMS3M9qBumY3habkQX fAzpPQQgv/+NIEzBLbSAKSkhQwrQgM6qNMvF10LcsLi5g5YZA0Q+jYE67Q7MLCmJPRGq7 6JVJIUTCgi1g0NRbRhPsOn40bds0IyxFYAcxetWO+Cg/u6kUr6FGi98Rpmw2PdC3rw0Wv leLZtC2ej9XlCmRDlk7TvvxI4sKCJKhquOEganFIkpeDrY3JBvsFElsSe6rIfhMTxswvC OfILZ5adLmNAExx+8B/hz1ZynA1Vv6EZiZnf8EwD49DpqDN2y8ps331LVoHaZYR5j2Q== 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=I61JEOaF; 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 82EE860A2618 for ; Fri, 20 Nov 2026 05:58:57 +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=I61JEOaF Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2B521F000CF; Fri, 20 Nov 2026 05:58:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795154337; bh=LOKwVorabByOXjosdllBVLJtr8tLz5o1OYo0vwf2VC0=; h=From:To:Cc:Subject:Date:Reply-To; b=I61JEOaFSsHiUQ4iNxIj/T5V4rBIWrj4Vq4jv3WDqp4LOVshzUd/YP6rFCOcDGwUz W/tOBw8rgzJLZK6CsMyKd6C4quiWc1bMbVm3N/jnLxRxpK3ccc4Z65B6y9gYS+V6JT MIhskLkO8FcgDj+vUEkSST0DGznDxYSqD3uluwSk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99707: mm/khugepaged: flush deferred unmaps before dropping a failed folio Date: Fri, 20 Nov 2026 06:51:33 +0100 Message-ID: <2026112004-CVE-2026-99707-d60a@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=3109; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=gdOQdRsRwUn4szxr0PCcy9w94zLfjpr+43II703f9Yk=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/7/fwbmlJWJAy88Nnn13Vea6/Q1Rn9xcW3agp5Ldvf ZpnNnVbRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzESZJhwdzZzXNiNv6K1oi6 PKnJhWe24dIbRgxzpd3UmF4cqbjrs+fezlIt3lu+535uAwA= 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/khugepaged: flush deferred unmaps before dropping a failed folio collapse_file() can fail its reference-count or dirty-folio check after unmapping with TTU_BATCH_FLUSH. Both paths put back the isolated folio, then unlock it and drop the lookup reference before reaching the common try_to_unmap_flush(). The page-cache reference does not keep the folio stable once the lock is released. Another collapse can replace and free it. With its PTEs already gone, that collapse cannot flush the first task's per-task TLB batch, and retract_page_tables() skips short or unaligned VMAs. A CPU can therefore retain a user translation to the freed folio. This has been reproduced with unprivileged MADV_COLLAPSE on a memfd. Flush at out_unlock while the lookup reference and folio lock are still held. The common flush continues to cover the accumulated pagelist on both success and rollback, preserving batching on successful collapses. The Linux kernel CVE team has assigned CVE-2026-99707 to this issue. Affected and fixed versions =========================== Issue introduced in 5.18 with commit 6d9df8a5889c569ab9e3bcb38b12e5b81b6b9bde and fixed in 6.12.118 with commit d9d621ad49a969587d32c98aee1d83e679b9d361 Issue introduced in 5.18 with commit 6d9df8a5889c569ab9e3bcb38b12e5b81b6b9bde and fixed in 6.18.64 with commit cf1902ab0203f8767a3582143049d1bea5422096 Issue introduced in 5.18 with commit 6d9df8a5889c569ab9e3bcb38b12e5b81b6b9bde and fixed in 7.3.5 with commit 8c4adb787f77318df3b478f928f271e26d557208 Issue introduced in 5.18 with commit 6d9df8a5889c569ab9e3bcb38b12e5b81b6b9bde and fixed in 7.4-rc2 with commit 854e5ff8b3ce2a776586cabebaeae645c992345b 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-99707 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/khugepaged.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/d9d621ad49a969587d32c98aee1d83e679b9d361 https://git.kernel.org/stable/c/cf1902ab0203f8767a3582143049d1bea5422096 https://git.kernel.org/stable/c/8c4adb787f77318df3b478f928f271e26d557208 https://git.kernel.org/stable/c/854e5ff8b3ce2a776586cabebaeae645c992345b