Junglewise Threat Intelligence

CVE-2025-38626: Linux Kernel F2FS kernel panic in f2fs_map_blocks

CVE-2025-38626 · Severity: medium · CVSS 5.5 · Published 2025-08-22

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's F2FS file system can cause a complete system crash (kernel panic). This occurs when the file system is used in a specific configuration (LFS mode) and multiple processes attempt to write data simultaneously, leading to an out-of-space error that the system cannot handle gracefully. An exploit of this flaw would result in a denial of service, disrupting operations and potentially causing data loss due to the sudden system failure.

Technical details

A kernel BUG (panic) exists in the F2FS file system component of the Linux kernel, specifically within the segment management logic. When the file system is mounted with the 'mode=lfs' option, the 'f2fs_map_blocks()' function performs aggressive block allocations using Out-Place-Update (OPU). Under heavy parallel I/O (AIO/DIO), the system can run out of physical space before foreground garbage collection (GC) is triggered, leading to a 'kernel BUG at fs/f2fs/segment.c'. The fix ensures foreground GC is triggered prior to block allocation in LFS mode. This is a local denial-of-service vulnerability requiring the ability to perform file writes on an F2FS partition.

Affected products

  • Linux Linux Kernel 4.8 to 6.6.102, 6.7 to 6.12.42, 6.13 to 6.15.10, 6.16 to 6.16.1

Timeline

  • 2025-08-22: advisory: NVD publication date
  • 2025-07-24: patched: Initial patch authored by Chao Yu

References

Related threats