mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
Btrfs: fix access_ok() check in btrfs_ioctl_send()
The closing parenthesis is in the wrong place. We want to check "sizeof(*arg->clone_sources) * arg->clone_sources_count" instead of "sizeof(*arg->clone_sources * arg->clone_sources_count)". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Jie Liu <jeff.liu@oracle.com> Signed-off-by: Chris Mason <clm@fb.com> cc: stable@vger.kernel.org
This commit is contained in:
parent
467bb1d27c
commit
700ff4f095
1 changed files with 2 additions and 2 deletions
|
@ -4723,8 +4723,8 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user *arg_)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!access_ok(VERIFY_READ, arg->clone_sources,
|
if (!access_ok(VERIFY_READ, arg->clone_sources,
|
||||||
sizeof(*arg->clone_sources *
|
sizeof(*arg->clone_sources) *
|
||||||
arg->clone_sources_count))) {
|
arg->clone_sources_count)) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue