CVE-2026-53368

f2fs: fix fsck inconsistency caused by incorrect nat_entry flag usage

Published Jul 19, 2026 CVSS 3.1 · 7.1 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

f2fs: fix fsck inconsistency caused by incorrect nat_entry flag usage

f2fs_need_dentry_mark() reads nat_entry flags without mutual exclusion
with the checkpoint path, which can result in an incorrect inode block
marking state. The scenario is as follows:

create & write & fsync 'file A' write checkpoint
- f2fs_do_sync_file // inline inode
- f2fs_write_inode // inode folio is dirty
- f2fs_write_checkpoint
- f2fs_flush_merged_writes
- f2fs_sync_node_pages
- f2fs_fsync_node_pages // no dirty node
- f2fs_need_inode_block_update // return true
- f2fs_fsync_node_pages // inode dirtied
- f2fs_need_dentry_mark //return true
- f2fs_flush_nat_entries
- f2fs_write_checkpoint end
- __write_node_folio // inode with DENT_BIT_SHIFT set
SPO, "fsck --dry-run" find inode has already checkpointed but still
with DENT_BIT_SHIFT set

The state observed by f2fs_need_dentry_mark() can differ from the state
observed in __write_node_folio() after acquiring sbi->node_write. The
root cause is that the semantics of IS_CHECKPOINTED and
HAS_FSYNCED_INODE are only guaranteed after the checkpoint write has
fully completed.

This patch moves set_dentry_mark() into __write_node_folio() and
protects it with the sbi->node_write lock.

Analysis

AI-generated

Technical impact

The vulnerability is a race condition in the f2fs filesystem checkpoint process where f2fs_need_dentry_mark accesses nat_entry flags without acquiring the sbi->node_write lock. When a write and fsync operation on the same inode occur concurrently, the function may set the DENT_BIT_SHIFT flag after the inode has already been checkpointed. This inconsistency can cause fsck to report a mismatch and may lead to corrupted or lost metadata if the filesystem continues to use the corrupted inode. The weakness is a data race (CWE‑367).

Affected Systems

All installations of the Linux kernel that include the unpatched f2fs code are vulnerable. The advisory does not list specific kernel versions, so any distribution using a kernel derived from a tree older than the commit that adds the patch must be examined. A kernel source tree that contains the commits identified by the patch references has the fix and is not affected.

Risk and Exploitability

The CVSS score of 7.1 indicates moderate severity, while the EPSS score of less than 1% signals a very low likelihood of exploitation. Based on the description, it is inferred that the attack vector is local, requiring a user to orchestrate a race between a file write and a fsync operation on an f2fs‑mounted filesystem. The flaw does not provide remote code execution or privilege escalation. The primary consequence, if exploited, is filesystem inconsistency that could result in data loss or availability impact. The vulnerability is not listed in the CISA KEV catalog.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Deploy a kernel version that contains the f2fs checkpointing fix, as indicated by the commit references in the advisory.
  • If a kernel upgrade is not immediately possible, cherry‑pick the referenced commit(s) into your kernel source tree and rebuild the kernel before rebooting.
  • After applying the fix, run fsck --dry-run on all f2fs partitions to detect existing inconsistencies, then unmount the filesystem and run a full fsck with repair enabled if necessary.

Generated by OpenCVE AI on August 12, 2026 at 09:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4904-1 linux-6.12 security update
Debian DLA Debian DLA DLA-4906-1 linux security update
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8663-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-8664-1 Linux kernel (NVIDIA BaseOS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-1 Linux kernel (GCP) vulnerabilities
Ubuntu USN Ubuntu USN USN-8781-1 Linux kernel (NVIDIA Tegra) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8728-3 Linux kernel (Oracle) vulnerabilities
History
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H'}

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: f2fs: fix fsck inconsistency caused by incorrect nat_entry flag usage f2fs_need_dentry_mark() reads nat_entry flags without mutual exclusion with the checkpoint path, which can result in an incorrect inode block marking state. The scenario is as follows: create & write & fsync 'file A' write checkpoint - f2fs_do_sync_file // inline inode - f2fs_write_inode // inode folio is dirty - f2fs_write_checkpoint - f2fs_flush_merged_writes - f2fs_sync_node_pages - f2fs_fsync_node_pages // no dirty node - f2fs_need_inode_block_update // return true - f2fs_fsync_node_pages // inode dirtied - f2fs_need_dentry_mark //return true - f2fs_flush_nat_entries - f2fs_write_checkpoint end - __write_node_folio // inode with DENT_BIT_SHIFT set SPO, "fsck --dry-run" find inode has already checkpointed but still with DENT_BIT_SHIFT set The state observed by f2fs_need_dentry_mark() can differ from the state observed in __write_node_folio() after acquiring sbi->node_write. The root cause is that the semantics of IS_CHECKPOINTED and HAS_FSYNCED_INODE are only guaranteed after the checkpoint write has fully completed. This patch moves set_dentry_mark() into __write_node_folio() and protects it with the sbi->node_write lock.
Title f2fs: fix fsck inconsistency caused by incorrect nat_entry flag usage
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 30, 2026, 12:27 PM
Reserved
Jun 9, 2026, 7:44 AM
Status
Modified
Published
Jul 19, 2026, 9:17 AM
Modified
Oct 30, 2026, 1:19 PM
Severity
Public date
Jul 19, 2026, 12:00 AM