Skip to main content
Vulnerability Database/CVE-2026-97534

CVE-2026-97534: Linux Kernel F2FS Privilege Escalation

CVE-2026-97534 is a privilege escalation vulnerability in the Linux kernel F2FS filesystem that causes incorrect free section accounting during segment range truncation. This article covers technical details, impact, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-97534 Overview

CVE-2026-97534 is a kernel vulnerability in the Linux f2fs (Flash-Friendly File System) resize path. The flaw resides in free_segment_range(), which temporarily reduces MAIN_SECS(sbi) by secs to restrict block allocation while garbage collection (GC) evacuates valid blocks from the truncated range. The function does not deduct sections that were already free within the truncated range from FREE_I(sbi)->free_sections. The filesystem then overestimates free capacity in the reduced main area, which can cause inconsistent accounting during GC data migration and trigger unexpected allocation failures or assertion errors under tight space conditions.

Critical Impact

Incorrect free-section accounting during f2fs resize operations can produce allocation failures and kernel assertion errors on systems that shrink f2fs volumes with limited free space.

Affected Products

  • Linux kernel versions containing the pre-patch f2fsfree_segment_range() implementation
  • Systems using f2fs volumes that undergo online resize or shrink operations
  • Distributions shipping unpatched stable kernel trees referenced in the upstream commits

Discovery Timeline

  • 2026-09-25 - CVE-2026-97534 published to the National Vulnerability Database (NVD)
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97534

Vulnerability Analysis

The defect is a filesystem accounting error in the f2fs resize-shrink code path. When an administrator shrinks an f2fs volume, free_segment_range() is invoked to migrate valid blocks out of the segment range being removed. During this operation, the code reduces MAIN_SECS(sbi) by the number of sections (secs) being truncated so that no new allocations target the doomed range.

The counter FREE_I(sbi)->free_sections, however, tracks free sections across the entire filesystem rather than only the surviving main area. Sections inside the truncated range that were already free are still counted in free_sections. The active main area therefore appears to contain more free capacity than it actually does. Garbage collection and allocator decisions made against this inflated value can fail or hit BUG_ON-style assertions when space is tight.

Root Cause

The root cause is missing symmetry between MAIN_SECS(sbi) and FREE_I(sbi)->free_sections during the resize window. The resize path adjusts the total section count but does not adjust the free-section counter to exclude already-free sections located inside the truncated range. The fix calculates the number of already-free sections in that range, deducts them from free_sections on entry to free_segment_range(), and restores them on exit.

Attack Vector

Triggering the condition requires privileged local operations that resize an f2fs volume, combined with a layout where sections within the truncated range are already free. There is no indication of remote exploitation. The resulting impact is availability-oriented: allocation failures, GC inconsistency, and potential kernel assertion failures. No CWE identifier is assigned, and no public proof-of-concept is listed.

See the upstream fixes for implementation detail: Kernel commit 8a123a1, Kernel commit 8c963d1, and Kernel commit ca31116.

Detection Methods for CVE-2026-97534

Indicators of Compromise

  • Kernel log messages from the f2fs subsystem reporting allocation failures or assertion failures during or after resize.f2fs operations.
  • Unexpected BUG_ON or WARN_ON entries in dmesg referencing free_segment_range or segment manager functions.
  • f2fs mounts transitioning to read-only mode following a shrink operation on volumes with limited free space.

Detection Strategies

  • Inventory kernel build versions across Linux endpoints and servers, and flag hosts running f2fs on unpatched stable branches referenced in the upstream commits.
  • Correlate resize.f2fs tool invocations with subsequent f2fs-tagged kernel errors in centralized logs.
  • Review change-management records to identify systems where f2fs volumes have been shrunk recently.

Monitoring Recommendations

  • Forward dmesg and /var/log/kern.log to a central log platform and alert on f2fs errors and GC-related assertions.
  • Track filesystem health counters and mount-state changes on hosts using f2fs for primary storage.
  • Monitor privileged execution of resize.f2fs and related filesystem administration binaries.

How to Mitigate CVE-2026-97534

Immediate Actions Required

  • Identify systems running f2fs and schedule kernel updates to a build that includes the upstream fix commits.
  • Avoid online shrink operations on f2fs volumes until the patched kernel is deployed, especially on volumes near capacity.
  • Ensure recent backups exist before any planned f2fs resize activity on unpatched hosts.

Patch Information

The fix is upstream in the Linux kernel. It deducts already-free sections within the truncated range from FREE_I(sbi)->free_sections on entry to free_segment_range() and restores them on exit, keeping accounting consistent with the temporary MAIN_SECS(sbi) reduction. Review the commits at Kernel commit 8a123a1, Kernel commit 8c963d1, and Kernel commit ca31116, then apply the stable kernel release that includes them for your distribution.

Workarounds

  • Defer resize.f2fs shrink operations on affected kernels, or perform resizes only when the volume has substantial free capacity outside the truncated range.
  • Restrict root-level access to filesystem administration tools so that resize operations are limited to authorized change windows.
  • Where feasible, migrate data off f2fs volumes and recreate at the desired size rather than performing online shrink.
bash
# Identify kernel version and f2fs mounts before planning remediation
uname -r
mount -t f2fs

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.