lkml.org 
[lkml]   [2013]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.12 078/118] Btrfs: fix access_ok() check in btrfs_ioctl_send()
    Date
    3.12-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Dan Carpenter <dan.carpenter@oracle.com>

    commit 700ff4f095d78af0998953e922e041d75254518b upstream.

    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>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/btrfs/send.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    --- a/fs/btrfs/send.c
    +++ b/fs/btrfs/send.c
    @@ -4756,8 +4756,8 @@ long btrfs_ioctl_send(struct file *mnt_f
    }

    if (!access_ok(VERIFY_READ, arg->clone_sources,
    - sizeof(*arg->clone_sources *
    - arg->clone_sources_count))) {
    + sizeof(*arg->clone_sources) *
    + arg->clone_sources_count)) {
    ret = -EFAULT;
    goto out;
    }



    \
     
     \ /
      Last update: 2013-12-18 23:01    [W:4.034 / U:0.772 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site