CVE-2026-89840 Overview
CVE-2026-89840 is a Linux kernel vulnerability in the f2fs (Flash-Friendly File System) implementation. The F2FS_IOC_MOVE_RANGE ioctl validates the source range but fails to validate the destination end before updating i_size. A source hole triggers the flaw because __clone_blkaddrs() skips NULL_ADDR entries and returns success, allowing the caller to extend the destination inode using an unchecked pos_out + len value. A local user with write access to an f2fs volume can exploit this behavior to corrupt filesystem state or crash the kernel.
Critical Impact
Local attackers can trigger destination inode size corruption in f2fs, causing filesystem integrity loss and potential kernel-level denial of service on affected Linux systems.
Affected Products
- Linux kernel f2fs filesystem driver
- Linux distributions shipping vulnerable stable kernel branches
- Systems mounting f2fs volumes accessible to local users
Discovery Timeline
- 2026-09-16 - CVE-2026-89840 published to NVD
- 2026-09-16 - Last updated in NVD database
Technical Details for CVE-2026-89840
Vulnerability Analysis
The flaw resides in the f2fs F2FS_IOC_MOVE_RANGE ioctl handler. This ioctl clones block address ranges from a source inode to a destination inode and, when necessary, extends the destination file size. The source range receives boundary validation, but the destination end position is not verified before i_size is updated.
When the source range contains a hole, __clone_blkaddrs() encounters NULL_ADDR entries. The function skips these entries and returns success without producing a failure signal to the caller. The caller then proceeds to extend the destination inode using the raw pos_out + len value supplied through the ioctl arguments.
Because no inode_newsize_ok() check gates the extension, the destination i_size can be updated to a value that violates filesystem invariants. This creates an inconsistency between the block address mapping and the file size metadata that f2fs maintains. Classification aligns with an Input Validation Error affecting file system integrity.
Root Cause
The root cause is missing boundary validation on the destination range in F2FS_IOC_MOVE_RANGE. Two defects combine: __clone_blkaddrs() silently succeeds on NULL_ADDR entries in the source, and the caller extends destination i_size without calling inode_newsize_ok() to verify the new size against filesystem and resource limits.
Attack Vector
Exploitation requires local access with permission to invoke the F2FS_IOC_MOVE_RANGE ioctl on an f2fs-mounted volume. An attacker crafts a source file containing holes and issues the ioctl with a pos_out + len value that exceeds valid destination bounds. The kernel updates i_size without validation, producing on-disk metadata corruption or triggering downstream kernel faults during subsequent I/O. No network access or user interaction is required.
No public proof-of-concept exploit code is available. Readers should consult the upstream commits referenced below for the precise patch semantics.
Detection Methods for CVE-2026-89840
Indicators of Compromise
- Unexpected changes in f2fs inode i_size values that do not correspond to legitimate writes or truncations
- Kernel log entries referencing f2fs consistency errors, fsck.f2fs warnings, or WARN_ON traces from block address handling paths
- Processes with local shell access invoking ioctl() with the F2FS_IOC_MOVE_RANGE request code on writable f2fs mounts
Detection Strategies
- Audit ioctl() syscalls with request code F2FS_IOC_MOVE_RANGE using auditd rules or eBPF probes attached to f2fs_ioctl
- Correlate f2fs kernel warnings with the invoking process, UID, and target inodes to identify anomalous callers
- Run periodic offline fsck.f2fs scans on non-production snapshots and flag inode size mismatches for review
Monitoring Recommendations
- Ship kernel ring buffer messages and audit records to a centralized log platform for retention and alerting
- Alert on repeated F2FS_IOC_MOVE_RANGE invocations from unprivileged UIDs or unexpected service accounts
- Track kernel version and f2fs patch level across the fleet to identify hosts running unpatched builds
How to Mitigate CVE-2026-89840
Immediate Actions Required
- Inventory Linux hosts that mount f2fs volumes and identify which run kernel versions predating the fix
- Apply the upstream stable kernel update containing the destination validation patch as soon as vendor packages are available
- Restrict local shell and container access on hosts exposing writable f2fs mounts until patches are deployed
Patch Information
The fix rejects destination overflow and calls inode_newsize_ok() before extending the destination inode inside F2FS_IOC_MOVE_RANGE. The upstream commits are available at kernel.org commit dcae1eed and kernel.org commit e533889f. Deploy the vendor kernel package that incorporates these commits and reboot affected hosts.
Workarounds
- Unmount f2fs volumes where feasible and migrate data to an alternative filesystem such as ext4 or xfs until the kernel patch is applied
- Remove local user access to hosts with writable f2fs mounts, or mount f2fs volumes read-only where the workload permits
- Constrain container and sandbox seccomp profiles to block the ioctl() syscall or the F2FS_IOC_MOVE_RANGE request code for untrusted workloads
# Identify mounted f2fs filesystems on a host
mount -t f2fs
# Example: remount an f2fs volume read-only as a temporary workaround
mount -o remount,ro /mnt/data
# Verify running kernel version against vendor advisories
uname -r
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

