MEDIUM 5.5

CVE-2026-53018: Linux f2fs Garbage Collection Kernel Panic Vulnerability

A bug in the Linux kernel's f2fs (Flash-Friendly File System) implementation can cause a crash when the garbage collector attempts to read a memory page that has already been updated and moved to a new location. During normal file system operations, a page may be relocated from one disk block to another and marked as up-to-date. If the garbage collector then tries to read that same page from its old location without checking its status first, it triggers a kernel panic. The fix prevents unnecessary read operations on pages that have already been refreshed, eliminating the crash condition.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
Affected products
1 configuration(s)
Published / Modified
2026-06-24 / 2026-07-15

NVD description (verbatim)

In the Linux kernel, the following vulnerability has been resolved: f2fs: avoid reading already updated pages during GC We found the following issue during fuzz testing: page: refcount:3 mapcount:0 mapping:00000000b6e89c65 index:0x18b2dc pfn:0x161ba9 memcg:f8ffff800e269c00 aops:f2fs_meta_aops ino:2 flags: 0x52880000000080a9(locked|waiters|uptodate|lru|private|zone=1|kasantag=0x4a) raw: 52880000000080a9 fffffffec6e17588 fffffffec0ccc088 a7ffff8067063618 raw: 000000000018b2dc 0000000000000009 00000003ffffffff f8ffff800e269c00 page dumped because: VM_BUG_ON_FOLIO(folio_test_uptodate(folio)) page_owner tracks the page as allocated post_alloc_hook+0x58c/0x5ec prep_new_page+0x34/0x284 get_page_from_freelist+0x2dcc/0x2e8c __alloc_pages_noprof+0x280/0x76c __folio_alloc_noprof+0x18/0xac __filemap_get_folio+0x6bc/0xdc4 pagecache_get_page+0x3c/0x104 do_garbage_collect+0x5c78/0x77a4 f2fs_gc+0xd74/0x25f0 gc_thread_func+0xb28/0x2930 kthread+0x464/0x5d8 ret_from_fork+0x10/0x20 ------------[ cut here ]------------ kernel BUG at mm/filemap.c:1563! folio_end_read+0x140/0x168 f2fs_finish_read_bio+0x5c4/0xb80 f2fs_read_end_io+0x64c/0x708 bio_endio+0x85c/0x8c0 blk_update_request+0x690/0x127c scsi_end_request+0x9c/0xb8c scsi_io_completion+0xf0/0x250 scsi_finish_command+0x430/0x45c scsi_complete+0x178/0x6d4 blk_mq_complete_request+0xcc/0x104 scsi_done_internal+0x214/0x454 scsi_done+0x24/0x34 which is similar to the problem reported by syzbot: https://syzkaller.appspot.com/bug?extid=3686758660f980b402dc This case is consistent with the description in commit 9bf1a3f ("f2fs: avoid GC causing encrypted file corrupted"): Page 1 is moved from blkaddr A to blkaddr B by move_data_block, and after being written it is marked as uptodate. Then, Page 1 is moved from blkaddr B to blkaddr C, VM_BUG_ON_FOLIO was triggered in the endio initiated by ra_data_block. There is no need to read Page 1 again from blkaddr B, since it has already been updated. Therefore, avoid initiating I/O in this case.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-53018 is a kernel panic vulnerability in f2fs's garbage collection (GC) routine. The issue occurs when a data page is moved from block address A to B (marked uptodate), then from B to C, and the I/O completion path (triggered by a stale read from B) attempts to mark the folio as uptodate again. This violates the kernel's filemap invariant checked in folio_end_read, which asserts that a folio must not already be uptodate when ending a read operation. The stack trace shows the crash at mm/filemap.c:1563 with the BUG triggered via f2fs_finish_read_bio. The root cause is that do_garbage_collect initiates reads via ra_data_block on pages that may have already been updated by move_data_block in a prior GC iteration or concurrent operation, without validating their current state.

Business impact

This vulnerability primarily affects systems running f2fs on Linux, particularly those using flash storage or SSDs where garbage collection is frequent. The crash results in immediate kernel panic and system downtime, disrupting services relying on those storage systems. Organizations running containerized workloads, embedded systems, or specialized appliances using f2fs may experience unplanned outages. The impact is localized to affected kernel versions and does not expose data confidentiality; however, availability impact is severe.

Affected systems

The Linux kernel is affected, specifically versions with the vulnerable f2fs garbage collection code. The issue impacts systems using f2fs as their primary or secondary file system, including embedded devices, NAS appliances, and systems with flash-optimized deployments. The vulnerability requires local access to trigger (unprivileged user context with ability to interact with f2fs-formatted storage), making it relevant to multi-user systems, cloud instances with f2fs volumes, and any f2fs-based deployments. Check your kernel version against the vendor advisory for exact affected ranges and patch availability.

Exploitability

Exploitation requires local access to the system with ability to indirectly trigger f2fs garbage collection activity, typically through file system I/O operations. An unprivileged user can cause the condition by creating files, deleting them, and writing repeatedly to force GC cycles. No special privileges or network access are required. The vulnerability manifests as a denial of service via kernel panic rather than privilege escalation or data corruption, making it a localized availability threat. The crash is reliable under fuzz-testing conditions, suggesting relatively consistent reproducibility once GC patterns align.

Remediation

Apply kernel updates provided by your Linux distribution that include the fix to avoid initiating I/O operations on pages already marked as uptodate during f2fs garbage collection. Verify the patch validates page state before calling ra_data_block or equivalent read functions. Interim mitigation includes disabling f2fs garbage collection if the file system is not critical (though this may degrade performance), or restricting local user access to systems using f2fs if risk tolerance is low. Monitor kernel logs for repeated GC warnings or crashes to detect exploitation attempts.

Patch guidance

Consult your Linux distribution's security advisory for kernel updates addressing CVE-2026-53018. Most major distributions (RHEL, Ubuntu, Debian, SUSE, etc.) will backport the fix to affected kernel branches. The upstream kernel fix involves adding state checks in the garbage collection path to prevent read operations on already-updated folios. Apply patches during your standard maintenance windows; kernel updates typically require a reboot. Verify patch application by confirming the kernel version is at or above the fixed version provided by your vendor.

Detection guidance

Monitor kernel logs (dmesg, journalctl) for 'VM_BUG_ON_FOLIO' messages or crashes in f2fs_finish_read_bio and do_garbage_collect functions. Systems may show repeated kernel panics or oops messages referencing filemap.c near line 1563. Crash dumps will indicate the f2fs_meta_aops or f2fs_node_aops address operations in the call stack. On systems running affected kernels, enable kernel logging and alerting on unexpected reboots or kernel panics. If f2fs is in use, these signatures are highly indicative of exploitation or triggering of this bug.

Why prioritize this

While the CVSS score of 5.5 reflects medium severity, this vulnerability warrants prompt attention for organizations relying on f2fs because it causes immediate denial of service with high likelihood of impact once triggered. The fix is straightforward and non-disruptive, and the upstream patch is available. Prioritize based on f2fs deployment scope: critical for appliances and embedded systems, moderate for general Linux servers with f2fs volumes, lower for systems using ext4 or other primary file systems. The lack of KEV status (not widely weaponized) provides some breathing room, but availability risk remains significant.

Risk score, explained

The CVSS score of 5.5 (Medium) reflects a local attack vector, low complexity, low privileges requirement, no user interaction, and high availability impact with no confidentiality or integrity risk. The scoring appropriately downgrades the severity from critical due to the local-only requirement, but the guaranteed denial of service and ease of triggering make it a practical threat for multi-user and cloud environments. Organizations with strict uptime SLAs or dense f2fs deployments should treat it as high-priority despite the medium CVSS rating.

Frequently asked questions

Does this vulnerability affect my system if I'm using ext4 or other file systems?

No. CVE-2026-53018 is specific to f2fs (Flash-Friendly File System). Systems using ext4, XFS, Btrfs, or other file systems are not affected. Check your file system type with 'df -T' or 'mount' command to confirm whether f2fs is in use.

Can this vulnerability be exploited remotely?

No. This is a local denial of service vulnerability that requires the ability to trigger file system operations on the affected system. Remote attackers cannot exploit it directly, but it may be relevant in cloud environments where unprivileged users have access to f2fs-formatted volumes.

Will applying the patch cause data loss?

No. The patch prevents unnecessary read operations on pages that have already been updated, which actually improves correctness and stability. It does not modify data or require file system recovery. Apply patches with normal caution during maintenance windows, but there is no data loss risk from this fix.

How do I know if my kernel is vulnerable?

Check your running kernel version with 'uname -r' and compare it against the vendor advisory for your distribution. You can also check the Linux kernel's git log or your distribution's CVE tracker. If your kernel version predates the fix and you use f2fs, assume it is vulnerable and plan to update.

This analysis is based on the CVE record and publicly available vulnerability information as of the publication date. Security teams should verify all patch version numbers, affected product versions, and KEV status against official vendor advisories before implementing remediation. SEC.co does not provide exploit code or weaponized proof-of-concept demonstrations. Testing should be conducted in controlled environments before deploying patches to production systems. Organizations should maintain their own threat assessments and risk prioritization based on their specific infrastructure, threat model, and business context. Source: NVD (public-domain), retrieved 2026-07-31. Analysis generated by SEC.co (claude-haiku-4-5).