CVE-2026-63816 Overview
CVE-2026-63816 is a use-after-free (UAF) vulnerability in the Linux kernel's Flash-Friendly File System (F2FS) implementation. The flaw resides in the handling of f2fs_inode_info.atomic_inode during concurrent garbage collection and inode eviction operations. A local attacker with the ability to invoke ioctl(F2FS_IOC_GARBAGE_COLLECT_RANGE) can trigger a race between f2fs_gc() and f2fs_evict_inode(), leading to access of freed inode memory.
The vulnerability affects kernel builds that include F2FS atomic write support. Successful exploitation can cause kernel memory corruption, denial of service, or local privilege escalation on affected systems.
Critical Impact
Local attackers can trigger a use-after-free on f2fs_inode_info structures, potentially leading to kernel memory corruption and privilege escalation on systems using the F2FS filesystem.
Affected Products
- Linux kernel branches implementing F2FS atomic write and copy-on-write (COW) inode support
- Linux distributions shipping vulnerable kernel versions prior to the fix commits
- Systems using F2FS filesystems with atomic write operations enabled (common on Android and flash-storage devices)
Discovery Timeline
- 2026-07-19 - CVE-2026-63816 published to the National Vulnerability Database (NVD)
- 2026-07-24 - Last updated in NVD database
Technical Details for CVE-2026-63816
Vulnerability Analysis
The vulnerability is a use-after-free race condition in the F2FS garbage collection path. F2FS uses an atomic_inode reference on the f2fs_inode_info structure to support atomic writes through a copy-on-write (COW) inode mechanism. During garbage collection, gc_data_segment() invokes ra_data_block() on the COW inode and dereferences F2FS_I(inode)->atomic_inode->i_mapping without holding a reference on the atomic_inode.
Concurrently, another thread can enter f2fs_evict_inode() for the same atomic_inode. The eviction path clears the FI_COW_FILE flag, sets F2FS_I(fi->cow_inode)->atomic_inode = NULL, calls truncate_inode_pages_final(), and eventually reaches clear_inode(). If garbage collection races in between and calls f2fs_grab_cache_folio() on the stale mapping, it creates new folios in the atomic_inode after truncation. The subsequent BUG_ON(atomic_inode->i_data.nrpages) in clear_inode() fires, and the underlying inode memory may be accessed after free.
Root Cause
The root cause is missing reference counting on fi->atomic_inode before its i_mapping field is accessed during garbage collection. The garbage collection code assumed the atomic_inode pointer remained valid for the duration of the operation, but nothing prevents a concurrent evictor from freeing the inode. This falls under CWE-416 (Use After Free) and includes a TOCTOU-style race in the F2FS COW inode lifecycle.
Attack Vector
Exploitation requires local access and the ability to issue the F2FS_IOC_GARBAGE_COLLECT_RANGE ioctl on an F2FS mount while another thread triggers inode eviction on an atomic COW inode. The race window between accessing F2FS_I(inode)->atomic_inode->i_mapping in ra_data_block() and its release in f2fs_evict_inode() provides the exploitation primitive. No specific proof-of-concept code is publicly available; the vulnerability is described in the upstream commit messages.
Refer to the upstream fix commits for the exact patched code paths: Kernel Git Commit 7d3ae217 and related backports.
Detection Methods for CVE-2026-63816
Indicators of Compromise
- Kernel BUG_ON or oops messages referencing clear_inode, truncate_inode_pages_final, or atomic_inode->i_data.nrpages
- Unexpected kernel panics on systems using F2FS with atomic write workloads
- KASAN reports flagging use-after-free reads inside ra_data_block() or gc_data_segment()
- Repeated invocations of F2FS_IOC_GARBAGE_COLLECT_RANGE from unprivileged processes
Detection Strategies
- Enable KASAN (Kernel Address Sanitizer) on test kernels to surface UAF conditions in F2FS code paths
- Audit process activity for unusual ioctl calls targeting F2FS filesystems, particularly F2FS_IOC_GARBAGE_COLLECT_RANGE
- Correlate kernel crash telemetry with F2FS mount points and atomic write usage patterns
- Monitor for repeated segfaults or oops entries in dmesg originating from the F2FS subsystem
Monitoring Recommendations
- Forward kernel logs and crash dumps to a centralized logging platform for anomaly analysis
- Track kernel version inventory across the fleet and flag hosts running unpatched F2FS-enabled kernels
- Alert on kernel crashes referencing f2fs_gc, gc_data_segment, or f2fs_evict_inode symbols
- Baseline expected ioctl volumes on F2FS filesystems to detect anomalous garbage collection triggers
How to Mitigate CVE-2026-63816
Immediate Actions Required
- Update to a Linux kernel version containing the upstream fix commits referenced below
- Restrict access to F2FS filesystems and the F2FS_IOC_GARBAGE_COLLECT_RANGE ioctl to trusted users where possible
- Inventory systems using F2FS (notably Android devices and flash-backed appliances) and prioritize patching
- Apply distribution vendor kernel updates as soon as they become available
Patch Information
The issue is fixed upstream. The patch adds a reference on fi->atomic_inode before its i_mapping field is used in the garbage collection path, preventing the eviction race. Relevant commits:
- Kernel Git Commit 7d3ae217
- Kernel Git Commit 56038756
- Kernel Git Commit a499f77c
- Kernel Git Commit a805fec3
- Kernel Git Commit e0288584
Workarounds
- Avoid mounting F2FS filesystems on systems where trusted patching is not yet available; use ext4 or another filesystem where feasible
- Disable atomic write workloads on F2FS mounts until patched kernels are deployed
- Limit local user access on multi-tenant hosts to reduce the attack surface for local UAF exploitation
- Enforce SELinux or AppArmor policies restricting ioctl operations on F2FS block devices for untrusted processes
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

