Executive brief
The Linux kernel's F2FS filesystem implementation contains a memory leak in the directory entry lookup function. When an error occurs during block search operations, the function fails to properly release a memory page reference, causing kernel memory to be unavailable for reuse. This can gradually degrade system performance and stability over time.
Technical details
The vulnerability is a reference counting bug (memory leak) in the F2FS filesystem's find_in_level() function located in fs/f2fs/dir.c. The function acquires a dentry folio via f2fs_find_data_folio() and passes it to find_in_block(); if find_in_block() returns an error (via IS_ERR macro), the error is stored and the loop breaks without releasing the folio reference. The fix is a one-line addition calling f2fs_folio_put(dentry_folio, false) before returning the error. This leak occurs on the error path only and requires file system operations that trigger the vulnerable code path (casefolding with encryption scenarios per the Fixes tag). The patch was committed upstream as cca7d3e30bf30333314e31bc70b9a739f1342167.
Affected products
- Linux Linux kernel Affected versions include stable kernels from linux-3.0.y through linux-7.2.y
Timeline
- 2026-09-16: disclosed
- 2026-09-11: patched: Fix committed to stable kernel trees