Description
In the Linux kernel, the following vulnerability has been resolved:

f2fs: fix potential deadlock in gc_merge path of f2fs_balance_fs()

When we mount device w/ gc_merge mount option, we may suffer below
potential deadlock:

Kworker GC trehad Truncator
- f2fs_write_cache_pages
- f2fs_write_single_data_page
- f2fs_do_write_data_page
- folio_start_writeback --- set writeback flag on folio
- f2fs_outplace_write_data
: cached folio in internal bio cache
- f2fs_balance_fs
- wake_up(gc_thread)
: wake up gc thread to run foreground GC
- finish_wait(fggc_wq)
: wait on the waitqueue --- wait on GC thread to finish the work
- truncate_inode_pages_range
- __filemap_get_folio(, FGP_LOCK) --- lock folio
- truncate_inode_partial_folio
- folio_wait_writeback --- wait on writeback being cleared
- do_garbage_collect
- move_data_page
- f2fs_get_lock_data_folio
- lock on folio --- blocked on folio's lock

In order to avoid such deadlock, let's call below functions to commit
cached bios in GC_MERGE path of f2fs_balance_fs() as the same as we did
in NOGC_MERGE path.
- f2fs_submit_merged_write(sbi, DATA);
- f2fs_submit_all_merged_ipu_writes(sbi);
Published: 2026-08-15
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The bug causes a deadlock in the f2fs file system when a device is mounted with the gc_merge option. During normal write operations the kernel wakes the garbage‑collection thread and waits for it to finish. The GC thread, while performing out‑of‑place writes, recursively acquires a folio lock that is already held by the wait‑queue operation waiting for writeback to clear. The result is a self‑sustaining lock cycle that freezes the kernel, potentially rendering the affected system unresponsive. This lack of atomicity and proper lock ordering directly violates basic concurrency guarantees.

Affected Systems

All Linux kernel releases that include the f2fs file system may be affected until the patch is applied. The vulnerability manifests when the fs is mounted with the gc_merge option, a feature often used for more aggressive garbage collection. Systems that rely on high I/O throughput or that frequently trigger background garbage collection are at greatest risk.

Risk and Exploitability

The severity is high due to the complete loss of system availability, but the CVSS score is not provided in the data. The EPSS score is not available and the issue is not listed in CISA’s KEV catalog, so publicly known exploitation attempts are currently unknown. The attack vector is likely local; an attacker must be able to influence the device that is mounted with the gc_merge option or corrupt the I/O timing sufficient to trigger the lock cycle. In the absence of a patch, the exploit does not require external network access, making systems that allow local users to mount f2fs filesystems the most vulnerable.

Generated by OpenCVE AI on August 15, 2026 at 08:13 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a release that includes the f2fs deadlock fix
  • Avoid mounting f2fs devices with the gc_merge option until a patched kernel is deployed
  • If immediate kernel upgrade is not possible, disable the gc_merge feature by omitting it from the mount options or replacing it with a safer garbage‑collection configuration

Generated by OpenCVE AI on August 15, 2026 at 08:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 15 Aug 2026 06:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: f2fs: fix potential deadlock in gc_merge path of f2fs_balance_fs() When we mount device w/ gc_merge mount option, we may suffer below potential deadlock: Kworker GC trehad Truncator - f2fs_write_cache_pages - f2fs_write_single_data_page - f2fs_do_write_data_page - folio_start_writeback --- set writeback flag on folio - f2fs_outplace_write_data : cached folio in internal bio cache - f2fs_balance_fs - wake_up(gc_thread) : wake up gc thread to run foreground GC - finish_wait(fggc_wq) : wait on the waitqueue --- wait on GC thread to finish the work - truncate_inode_pages_range - __filemap_get_folio(, FGP_LOCK) --- lock folio - truncate_inode_partial_folio - folio_wait_writeback --- wait on writeback being cleared - do_garbage_collect - move_data_page - f2fs_get_lock_data_folio - lock on folio --- blocked on folio's lock In order to avoid such deadlock, let's call below functions to commit cached bios in GC_MERGE path of f2fs_balance_fs() as the same as we did in NOGC_MERGE path. - f2fs_submit_merged_write(sbi, DATA); - f2fs_submit_all_merged_ipu_writes(sbi);
Title f2fs: fix potential deadlock in gc_merge path of f2fs_balance_fs()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-15T05:51:19.713Z

Reserved: 2026-07-30T09:28:09.395Z

Link: CVE-2026-68459

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-15T06:18:15.460

Modified: 2026-08-15T06:18:15.460

Link: CVE-2026-68459

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-15T08:15:04Z

Weaknesses

No weakness.