CVE-2026-53017: f2fs: fix data loss caused by incorrect use of nat_entry flag
In the Linux kernel, the following vulnerability has been resolved:
f2fs: fix data loss caused by incorrect use of natentry flag
Data loss can occur when fsync is performed on a newly created file (before any checkpoint has been written) concurrently with a checkpoint operation. The scenario is as follows:
create & write & fsync 'file A' write checkpoint - f2fsdosyncfile // inline inode - f2fswriteinode // inode folio is dirty - f2fswritecheckpoint - f2fsflushmergedwrites - f2fssyncnodepages - f2fsflushnatentries - f2fsfsyncnodepages // no dirty node - f2fsneedinodeblockupdate // return false SPO and lost 'file A'
f2fsflushnatentries() sets the ISCHECKPOINTED and HASLASTFSYNC flags for the natentry, but this does not mean that the checkpoint has actually completed successfully. However, f2fsneedinodeblockupdate() checks these flags and incorrectly assumes that the checkpoint has finished.
The root cause is that the semantics of ISCHECKPOINTED and HASLASTFSYNC are only guaranteed after the checkpoint write fully completes.
This patch modifies f2fsneedinodeblockupdate() to acquire the sbi->nodewrite lock before reading the natentry flags, ensuring that once ISCHECKPOINTED and HASLASTFSYNC are observed to be set, the checkpoint operation has already completed.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-53017?
The severity of CVE-2026-53017 is rated as medium with a CVSS score of 5.5.
What impact does CVE-2026-53017 have?
CVE-2026-53017 can lead to data loss when fsync is performed on a newly created file concurrently with a checkpoint operation.
How do I fix CVE-2026-53017?
To fix CVE-2026-53017, apply the available patch provided in the Linux kernel updates.
On which software does CVE-2026-53017 affect?
CVE-2026-53017 affects the Linux kernel, specifically the f2fs file system.
When was CVE-2026-53017 published?
CVE-2026-53017 was published on June 24, 2026.