Re: [f2fs-dev] [PATCH] f2fs: validate MOVE_RANGE destination size

Chao Yu via Linux-f2fs-devel <[email protected]> Mon, 3 Aug 2026 11:04:26 +0800
Newsgroups net.sourceforge.lists.linux-f2fs-devel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 6/30/26 11:17, Wenjie Qi wrote:
> 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.
> 
> Fixes: 4dd6f977fc77 ("f2fs: support an ioctl to move a range of data blocks")
> Cc: [email protected]
> Assisted-by: Codex:gpt-5.5
> Signed-off-by: Wenjie Qi <[email protected]>

Reviewed-by: Chao Yu <[email protected]>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel