f2fs: check position in move range ioctl
authorDan Robertson <dan@dlrobertson.com>
Sun, 30 Aug 2020 21:45:23 +0000 (21:45 +0000)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 11 Sep 2020 18:11:25 +0000 (11:11 -0700)
commitaad1383cbf08c87f29f5dba1622e122717fbc32a
tree4301709a2b41087742d804eb86b030520cded895
parent335cac8b25fd4601160080d2c012154c2f3b8676
f2fs: check position in move range ioctl

When the move range ioctl is used, check the input and output position and
ensure that it is a non-negative value. Without this check
f2fs_get_dnode_of_data may hit a memmory bug.

Signed-off-by: Dan Robertson <dan@dlrobertson.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c