CVE-2026-99740: mm/shmem: stop retrying folios that cannot be split
In the Linux kernel, the following vulnerability has been resolved:
mm/shmem: stop retrying folios that cannot be split
A fault or collapse can insert a large folio crossing EOF after shmemundorange() has handled the boundary folios. If splitting that folio fails, truncateinodepartialfolio() retains it when it is dirty. The final scan then repeatedly finds it because it restarts from an unchanged start.
Truncation keeps the inode lock and ignores fatal signals while looping. A concurrent unlink() can then block other directory operations while holding the directory lock and waiting for the file's lock.
Advance start past the retained folio, whose truncated part has already been zeroed. Do not move start backwards if the failed split has shrunk the folio.
Fix generated by an LLM and sent by Chris Mason in private.
[ david: split fixes, simplify descriptions, adjust comments ]
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.2 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.7 - 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
Frequently Asked Questions
What conditions are needed to trigger the truncation loop?
A large shmem folio must cross EOF after boundary handling, splitting that folio must fail, and the folio must be dirty so truncate_inode_partial_folio() retains it. The final truncation scan can then repeatedly revisit the unchanged start position.
What is the operational impact of exploitation or accidental triggering?
Truncation can loop while retaining the inode lock and ignoring fatal signals. A concurrent unlink() may then hold a directory lock while waiting for the file lock, blocking other directory operations.
Are there mitigations if the fix cannot be applied immediately?
The provided information does not identify a configuration workaround. Reducing or avoiding concurrent truncation and unlink activity involving affected shmem files may reduce exposure, but this is not stated as a complete mitigation.
How can administrators identify systems that include the fix?
The available references identify stable kernel commits dfedff4a9f0abcd985dcdfbd721dcd9374d6ff12, 1360e0f9a188cfede01d0df81119d925bbfff165, and b3239a5a37bba078d83cfb864d47a0cc122f17cd. No affected or fixed kernel version numbers are provided.