CVE-2026-99507: mm/hugetlb: fix use-after-free in hugetlb_mfill_atomic_pte()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
mm/hugetlb: fix use-after-free in hugetlb_mfill_atomic_pte()
Let's fix another instance where we use a folio after dropping the PTL, where someone else could e.g., MADV_DONTNEED it once we drop the PTL, making us trigger a use-after-free on the folio.
The Linux kernel CVE team has assigned CVE-2026-99507 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.11 with commit 1c9e8def43a3452e7af658b340f5f4f4ecde5c38 and fixed in 6.12.117 with commit cda6c4819b4a45dbeac92652eaaffb156b3f11b1 Issue introduced in 4.11 with commit 1c9e8def43a3452e7af658b340f5f4f4ecde5c38 and fixed in 6.18.61 with commit 8b87fd23be5a816ad572e23eb4e1e2bea027db6c Issue introduced in 4.11 with commit 1c9e8def43a3452e7af658b340f5f4f4ecde5c38 and fixed in 7.3.2 with commit 83798e46a01c3139273cddcc634e96dfee980c42 Issue introduced in 4.11 with commit 1c9e8def43a3452e7af658b340f5f4f4ecde5c38 and fixed in 7.4-rc1 with commit d8a9cd7fd2fb01211430c933932da58839b8ca65 Issue introduced in 3.18.137 with commit e37f1f9158e0c4a054993c07652f51e51dcd00ee Issue introduced in 4.4.177 with commit aba029c8e7a84f259d7366b513bc262e2d70cbd8 Issue introduced in 4.9.163 with commit b010e03dd5306eef6ba983f17017bfecbf4150f3
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-99507
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/hugetlb.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/cda6c4819b4a45dbeac92652eaaffb156b3f11b1 https://git.kernel.org/stable/c/8b87fd23be5a816ad572e23eb4e1e2bea027db6c https://git.kernel.org/stable/c/83798e46a01c3139273cddcc634e96dfee980c42 https://git.kernel.org/stable/c/d8a9cd7fd2fb01211430c933932da58839b8ca65