CVE-2026-89840: f2fs: validate MOVE_RANGE destination size
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2026-89840 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.8 with commit 4dd6f977fc778e5a0da604e5f8cb2f36d163d27b and fixed in 7.2.5 with commit dcae1eeda53149f219dd6af93b3083b7271c1c63 Issue introduced in 4.8 with commit 4dd6f977fc778e5a0da604e5f8cb2f36d163d27b and fixed in 7.3-rc1 with commit e533889fc26aea0cd83c90327063f272061dd820
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-89840
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/f2fs/file.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/dcae1eeda53149f219dd6af93b3083b7271c1c63 https://git.kernel.org/stable/c/e533889fc26aea0cd83c90327063f272061dd820