Skip to contentSkip to conversation

CVE-2026-99730: mm/filemap: finish fault cleanup before dropping the fault lock

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 20

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

mm/filemap: finish fault cleanup before dropping the fault lock

On a retried fault, a fatal signal interrupting the folio lock wait makes lock_folio_maybe_drop_mmap() drop the fault lock without pinning the file. However, filemap_fault() may still need to release mapping->invalidate_lock. A concurrent munmap() can release the last file reference and free the mapping before that unlock.

Defer dropping the fault lock to filemap_fault()'s retry cleanup, after releasing invalidate_lock. If the fault lock was already dropped for I/O, release the existing file reference instead. Keep the fault lock held for FAULT_FLAG_RETRY_NOWAIT as before.

The Linux kernel CVE team has assigned CVE-2026-99730 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.15 with commit 730633f0b7f951726e87f912a6323641f674ae34 and fixed in 6.12.118 with commit efa7aec3f30d79a7d35edd219c6f49235f331013
	Issue introduced in 5.15 with commit 730633f0b7f951726e87f912a6323641f674ae34 and fixed in 6.18.64 with commit f1c149e651fd55edc0769b76ebd688ae6cbd48f0
	Issue introduced in 5.15 with commit 730633f0b7f951726e87f912a6323641f674ae34 and fixed in 7.3.5 with commit 8500faaa6ef7b4489294f2bf98c9017ee009986c
	Issue introduced in 5.15 with commit 730633f0b7f951726e87f912a6323641f674ae34 and fixed in 7.4-rc2 with commit 97156a6c355c21f7122421915f05461bd11699a4

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-99730

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/filemap.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/efa7aec3f30d79a7d35edd219c6f49235f331013
	https://git.kernel.org/stable/c/f1c149e651fd55edc0769b76ebd688ae6cbd48f0
	https://git.kernel.org/stable/c/8500faaa6ef7b4489294f2bf98c9017ee009986c
	https://git.kernel.org/stable/c/97156a6c355c21f7122421915f05461bd11699a4