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=1795100143; b=NYh6akjFhYHNaqfZIDkPJtkPWEWWkhuw4PAc/TzZPpurUKCRKyFCIuXj3OqE0VmUDUNP xTagBSuL5EfB1+ooq7qGAKp3RT7pk0D+G7z7GUXqCRcn7ROEpG8d/oAqaYqEJh/IylYiD GyouDY46ieipXeAnKD/VQwZOGn4KCaz54rrQx+KTNNfag4hPEJZKvotT2Zxj1dbUTCOG3 jI2v3ZzM2obr9HQQ+mleB/BkVIMc+Jj1eHDdKkT9WeFIjZz/tQ02WND1NN64zDgWwoRoo 2pnuWFfaLJ/kqQnMElgaroin2SjnPkJ8k/IYDd3PwIw0W/S5leQD00qcAzvVlXtgpZg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795100143; 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=lc64uionjJBZH+1KJJlz0NniA5t2FTh0PSC5LyAGlxg=; b=1v6Ex/MTsVnTydzwvieXCPlur9AJfIwmKAvP1R7+7doSe+hq6FqpB7Z253AmDKHgZmhu KhkArNqSd7+Fz9Ld46s2CdyBl+rP/xxdh86y0XW97A2Eki+JMM+ycZOE0TdL55jMFS3xj dNnVLfHwKcCUAK+1D1yHoEoYGnYfpqotz+M/MJZz4XynNm+tnRkwGrXknpFokGj86R+sF P/XVVX6xi5rb+dcaL1eoKnzTZecn+/W5JAZbY6rtvjhXPo7fut60OyC/JTIn1H4C2wjeU tfwcu0e+tcfgMjIjLCdeeUTucCxQZtqcCdqwZKywKuwIFME7XTRmpXghZNrDyou4XRg== 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="t/iy3hsf"; 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 000CB606A320 for ; Thu, 19 Nov 2026 14:55:42 +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=t/iy3hsf Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8237B1F000C4; Thu, 19 Nov 2026 14:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795100142; bh=lc64uionjJBZH+1KJJlz0NniA5t2FTh0PSC5LyAGlxg=; h=From:To:Cc:Subject:Date:Reply-To; b=t/iy3hsfbx40d+jxUsIpc6Ohe341L+1uXnnH5nagw9O5n9ZTJsdA0eY5t01FEC9Rp h2v5m3EIVO0BPx4eJUVbEeLXb2TvQq6PpeigwSfDCzZJCrnBLmk2cSja0p/KT4iar6 9w89boXvdbAjpRiYcskQrQK4CazGXhpgve75cDZY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99463: mm/rmap: don't discard lazyfree THPs at PMD level Date: Thu, 19 Nov 2026 15:26:01 +0100 Message-ID: <2026111909-CVE-2026-99463-b70f@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=4327; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=sILdCj4sYGJOxzvKgX9XFHNiZ2edvi2yqweKt1NwfLs=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/2ToZHvP7aKxaoKl5YPucVwe3Lun7/WX/fO6002und rivuqTR3hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIbwsUpABNZ8Y5hwdbooNqMhLrQF/6F O0sPMnf8m16WxbDg/A72L8Ylhcd2Xjnz9If1+XMOi3cyAAA= 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/rmap: don't discard lazyfree THPs at PMD level __discard_anon_folio_pmd_locked() clears a lazyfree THP's PMD before it determines whether the folio can be discarded, and restores it if the folio is dirty or has extra references. It is done under only the PMD lock and the anon_vma read lock inside try_to_unmap_one() and no mmap lock is held. The temporarily none PMD causes UAF. A parallel munmap() or mremap() is supposed to serialize with it on the PMD lock, but zap_pmd_range() (called by munmap()) and move_page_tables() (called by mremap()) do not take the lock when they see the temporarily none PMD and skip the PMD. There is no more page table walk after the none PMD is restored: - munmap(): free_pgtables() waits in unlink_anon_vmas() for the anon_vma lock, then free_pmd_range() drops the restored PMD as bad without removing the rmap, so the folio keeps a stale mapcount. - whole-VMA MREMAP_DONTUNMAP: dontunmap_complete() unlinks the source VMA from its anon_vma while the restored PMD still maps the folio. - plain mremap(): the THP is not moved but unmapped, so the THP's data is lost. In the first two cases, the folio stays mapped, but no VMA that maps it is linked to its anon_vma. When the anon_vma is freed, it is still reachable when one rmap walks the folio. Racing lazyfree reclaim against MREMAP_DONTUNMAP as an unprivileged user reproduces a KASAN use-after-free in folio_lock_anon_vma_read() as reported in the Closes link. One solution is to use an invalidated PMD instead of a cleared one until the discard is committed, but it needs arch fixes first. 1. GUP-fast still follows an invalidated PMD on riscv, LoongArch and s390. 2. sparc64 miscounts thp_pte_count when an invalidated PMD is set again or cleared. To keep the fix simple for backport, stop discarding lazyfree THPs at PMD level instead. try_to_unmap_one() splits the PMD and discards the folio at PTE level. unmap_huge_pmd_locked() and __discard_anon_folio_pmd_locked() are left in place, unused, to minimize this fix for backport and the invalidated PMD approach is planned as a follow-up series to use them again. The Linux kernel CVE team has assigned CVE-2026-99463 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit 735ecdfaf4e802209caf34b7ac45adf448c54ccc and fixed in 6.12.117 with commit 8cf9517996067cfbfc5abdb4cfb3d7e15a7b34a3 Issue introduced in 6.11 with commit 735ecdfaf4e802209caf34b7ac45adf448c54ccc and fixed in 6.18.61 with commit 3594027c292b09d9301b4be80fa8e0c815ffaf2a Issue introduced in 6.11 with commit 735ecdfaf4e802209caf34b7ac45adf448c54ccc and fixed in 7.3.2 with commit b8c683bd548268453d50e933aab2e7d50a7ac2be Issue introduced in 6.11 with commit 735ecdfaf4e802209caf34b7ac45adf448c54ccc and fixed in 7.4-rc1 with commit 984c0700854e35779a2bcce6b02783e709b6efa2 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-99463 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/rmap.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/8cf9517996067cfbfc5abdb4cfb3d7e15a7b34a3 https://git.kernel.org/stable/c/3594027c292b09d9301b4be80fa8e0c815ffaf2a https://git.kernel.org/stable/c/b8c683bd548268453d50e933aab2e7d50a7ac2be https://git.kernel.org/stable/c/984c0700854e35779a2bcce6b02783e709b6efa2