CVE-2026-89840 PUBLISHED

f2fs: validate MOVE_RANGE destination size

Assigner: Linux
Reserved: 11.09.2026 Published: 16.09.2026 Updated: 16.09.2026

In the Linux kernel, the following vulnerability has been resolved:

f2fs: validate MOVE_RANGE destination size

F2FS_IOC_MOVE_RANGE checks the source range, but not the destination end before updating i_size. A source hole can expose this: __clone_blkaddrs() skips NULL_ADDR entries and returns success, so the caller can still extend the destination inode with unchecked pos_out + len.

Reject destination overflow and use inode_newsize_ok() before extending the destination inode.

Metrics

CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
CVSS Score: 7.1

AV:L - F2FS_IOC_MOVE_RANGE is a local ioctl (f2fs_ioctl → f2fs_ioc_move_range → f2fs_move_file_range) on f2fs file descriptors. f2fs has no remap_file_range, so nfsd/ksmbd copy_file_range cannot reach this path. AC:L - The attacker fully controls pos_out and len and can ftruncate a sparse source so __clone_blkaddrs skips NULL_ADDR holes and returns success, making the unchecked destination i_size update deterministic with no race or uncontrollable layout. PR:L - f2fs_ioc_move_range has no capable() check; it only needs FMODE_READ|FMODE_WRITE on the source and FMODE_WRITE on the destination. Any unprivileged user with files on mounted f2fs (Android /data, embedded userdata) can trigger it. UI:N - The attacker opens their own files on an already-mounted f2fs volume and issues F2FS_IOC_MOVE_RANGE; no separate victim action such as mounting a filesystem or opening a crafted file is required. S:U - Impact is corruption of f2fs inode size metadata and subsequent filesystem/kernel state on the local host, a standard kernel compromise within the same security authority with no VM escape or IOMMU bypass. C:N - The bug writes an oversized or overflowed i_size; reads of the resulting sparse file return zeros or EOF (negative i_size makes pos >= i_size), and lookups beyond max_file_blocks fail with -E2BIG, so there is no kernel-memory or cross-file disclosure primitive. I:H - Missing overflow and inode_newsize_ok() checks let the attacker set destination i_size past s_maxbytes or wrap size_t into a negative loff_t, persisting corrupt on-disk inode size and poisoning later paths (fallocate COLLAPSE nrpages, __exchange_data_block ALLOC_NODE) that trust i_size for block-tree updates. A:H - A poisoned i_size enables unbounded node-tree walks and block-exchange loops (SEEK_DATA/HOLE, fallocate COLLAPSE via DIV_ROUND_UP(i_size)), can hang the kernel or exhaust node space, and leaves durable filesystem corruption on shared f2fs userdata.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 4dd6f977fc778e5a0da604e5f8cb2f36d163d27b to dcae1eeda53149f219dd6af93b3083b7271c1c63 (excl.)
  • affected from 4dd6f977fc778e5a0da604e5f8cb2f36d163d27b to e533889fc26aea0cd83c90327063f272061dd820 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 4.8 is affected
  • unaffected from 0 to 4.8 (excl.)
  • unaffected from 7.2.5 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References