CVE-2026-53368 Overview
CVE-2026-53368 is a race condition in the Linux kernel's Flash-Friendly File System (f2fs) that produces filesystem inconsistencies detectable by fsck. The function f2fs_need_dentry_mark() reads nat_entry flags without holding the sbi->node_write lock that serializes access with the checkpoint path. Concurrent execution of fsync and checkpoint writes can leave inode blocks marked with DENT_BIT_SHIFT after checkpointing has completed. Following a sudden power-off (SPO), fsck --dry-run reports the affected inode as checkpointed yet still carrying the dentry mark, indicating on-disk metadata inconsistency.
Critical Impact
A local, low-privileged user performing normal write and fsync workloads can trigger filesystem metadata corruption that surfaces after a sudden power-off, threatening data integrity and availability on f2fs volumes.
Affected Products
- Linux kernel builds containing the vulnerable f2fs node write path prior to the referenced upstream fixes
- Distributions shipping stable kernels that had not yet backported commits 019f9dda7f66, b28a83ea4934, or bedb710b63ae
- Systems using f2fs as a primary or auxiliary filesystem, including mobile and embedded Linux deployments
Discovery Timeline
- 2026-07-19 - CVE-2026-53368 published to NVD
- 2026-07-20 - Last updated in NVD database
Technical Details for CVE-2026-53368
Vulnerability Analysis
The defect is a synchronization gap in the f2fs node accounting code. When a process creates, writes, and fsyncs an inline inode, f2fs_do_sync_file() calls f2fs_write_inode() and later f2fs_fsync_node_pages(). In parallel, f2fs_write_checkpoint() executes f2fs_flush_merged_writes(), f2fs_sync_node_pages(), and f2fs_flush_nat_entries().
Because f2fs_need_dentry_mark() reads nat_entry flags without acquiring sbi->node_write, the value observed there can diverge from what __write_node_folio() sees after taking the lock. The result is an inode folio written to disk with DENT_BIT_SHIFT set even though the checkpoint that would have justified clearing it has already completed. Running fsck --dry-run after a sudden power-off then flags an inconsistency.
Root Cause
The IS_CHECKPOINTED and HAS_FSYNCED_INODE semantics used by f2fs_need_dentry_mark() are only reliable after the checkpoint write has fully completed. Reading these flags outside of sbi->node_write allows a stale view. Two independent paths update and consume the same nat_entry state without a common lock, producing a classic time-of-check to time-of-use pattern in kernel metadata handling.
Attack Vector
Exploitation requires local access with permission to write files on an f2fs volume. No user interaction and no elevated privileges are needed beyond normal file write and fsync capability. An attacker or unlucky workload issuing concurrent create, write, and fsync operations while checkpointing runs can race the two paths. A subsequent sudden power-off or forced reboot leaves the filesystem in a state where fsck reports inode metadata inconsistencies, threatening data integrity and potentially causing service disruption on affected volumes.
The upstream fix moves set_dentry_mark() into __write_node_folio() and protects the operation with the sbi->node_write lock. No verified public exploit code is available. See the kernel commit references for the exact patch.
Detection Methods for CVE-2026-53368
Indicators of Compromise
- fsck.f2fs --dry-run output reporting inodes flagged as checkpointed while still carrying the DENT_BIT_SHIFT marker
- Kernel logs showing frequent concurrent f2fs_write_checkpoint and f2fs_do_sync_file activity followed by unclean shutdowns
- Unexpected f2fs recovery messages at mount time after sudden power-off events
Detection Strategies
- Inventory running kernel versions against the fixed commits 019f9dda7f66, b28a83ea4934, and bedb710b63ae to identify unpatched hosts
- Periodically run fsck.f2fs --dry-run on maintenance windows for hosts using f2fs and alert on inconsistency findings
- Correlate host reboot events with subsequent f2fs recovery log entries to spot repeat offenders
Monitoring Recommendations
- Ship kernel ring buffer and f2fs mount messages to a central log store for retention and query
- Monitor storage subsystems on mobile, embedded, and container hosts where f2fs is common
- Track patch compliance for stable kernel branches and flag drift from the fixed baseline
How to Mitigate CVE-2026-53368
Immediate Actions Required
- Update to a Linux kernel that includes the upstream fixes referenced in the kernel commits 019f9dda7f66, b28a83ea4934, and bedb710b63ae
- Restrict local, untrusted write access to f2fs volumes where patching cannot be applied immediately
- Ensure orderly shutdown procedures and UPS coverage to reduce the sudden power-off events that expose the inconsistency
Patch Information
The fix moves set_dentry_mark() into __write_node_folio() and executes it under the sbi->node_write lock, aligning the state observed by f2fs_need_dentry_mark() with the state written on disk. Reference the upstream kernel changes at the Kernel Git Commit 019f9dda7f66, Kernel Git Commit b28a83ea4934, and Kernel Git Commit bedb710b63ae. Consume the fix through your distribution's stable kernel update channel where possible.
Workarounds
- Reduce write and fsync concurrency against f2fs volumes on unpatched systems until the kernel update is deployed
- Schedule regular fsck.f2fs runs during planned maintenance to detect and repair inconsistencies early
- Where feasible, migrate critical data to a filesystem not affected by this defect until patched kernels are in production
# Verify running kernel and check for the fix in stable trees
uname -r
# On Debian/Ubuntu based systems
apt list --upgradable | grep -i linux-image
sudo apt update && sudo apt install --only-upgrade linux-image-$(uname -r | cut -d- -f3-)
# On RHEL/Fedora based systems
sudo dnf check-update kernel
sudo dnf update kernel
# Run a read-only consistency check on an f2fs volume
sudo fsck.f2fs --dry-run /dev/<f2fs-device>
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

