CVE-2026-99462: mm/truncate: look up the end-edge straddler by index
In the Linux kernel, the following vulnerability has been resolved:
mm/truncate: look up the end-edge straddler by index
In truncateinodepartialfolio(), after the first split at the start edge, foliosplit() unlocks and drops the refcount of the after-split sub-folios. The sub-folio straddling the end of the truncation range is therefore unlocked and only transiently ref'd in the page cache while the code still derives it from a page pointer inside the original folio.
Between the first split finishing and pagefolio() resolving splitat2, that tail page can be reclaimed, freed and reallocated as a new large folio in the same mapping at a different file offset. folio2 then points at a folio that does not cover the end boundary, yet folio2->mapping == folio->mapping still holds, so the stale pointer passes the mapping check and foliosplitorunmap() splits a folio at a wrong position (or, with a transient refcount, a use-after-free window opens between tryget and the split). foliosplit()'s own folio != pagefolio(splitat) check cannot catch this either since splitat2 has been reallocated as part of the new folio, so pagefolio(splitat2) resolves back to folio2.
Look the straddler up by its page index instead. filemapgetfolio() returns the folio currently covering the boundary, ref'd and locked, with the mapping validated under the lock, so the split target is always the real folio at the end edge.
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.18.63 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2