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.
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.
| Attack Vector |
Local |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
None |
| Privileges Required |
Low |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
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.
CVSS 3.1