CVE-2026-99730: mm/filemap: finish fault cleanup before dropping the fault lock
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 lockfoliomaybedropmmap() drop the fault lock without pinning the file. However, filemapfault() may still need to release mapping->invalidatelock. A concurrent munmap() can release the last file reference and free the mapping before that unlock.
Defer dropping the fault lock to filemapfault()'s retry cleanup, after releasing invalidatelock. If the fault lock was already dropped for I/O, release the existing file reference instead. Keep the fault lock held for FAULTFLAGRETRYNOWAIT as before.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.5-1
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
The affected path requires a retried page fault where a fatal signal interrupts waiting for a folio lock. A concurrent munmap() must then be able to release the last file reference while filemap_fault() still needs to release mapping->invalidate_lock.
What is the race condition involved?
The fault lock can be dropped without pinning the file, allowing concurrent munmap() to free the mapping before filemap_fault() unlocks mapping->invalidate_lock. The fix moves fault-lock dropping to retry cleanup after invalidate_lock has been released, or releases an existing file reference when the fault lock was already dropped for I/O.
Does the change alter handling of FAULT_FLAG_RETRY_NOWAIT?
No. The stated fix keeps the fault lock held for FAULT_FLAG_RETRY_NOWAIT, as before.