lkml.org 
[lkml]   [2012]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[ 01/37] Remove easily user-triggerable BUG from generic_setlease
    Date
    From: Greg KH <gregkh@linuxfoundation.org>

    3.4-stable review patch. If anyone has any objections, please let me know.

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

    From: Dave Jones <davej@redhat.com>

    commit 8d657eb3b43861064d36241e88d9d61c709f33f0 upstream.

    This can be trivially triggered from userspace by passing in something unexpected.

    kernel BUG at fs/locks.c:1468!
    invalid opcode: 0000 [#1] SMP
    RIP: 0010:generic_setlease+0xc2/0x100
    Call Trace:
    __vfs_setlease+0x35/0x40
    fcntl_setlease+0x76/0x150
    sys_fcntl+0x1c6/0x810
    system_call_fastpath+0x1a/0x1f

    Signed-off-by: Dave Jones <davej@redhat.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/locks.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/fs/locks.c
    +++ b/fs/locks.c
    @@ -1465,7 +1465,7 @@ int generic_setlease(struct file *filp,
    case F_WRLCK:
    return generic_add_lease(filp, arg, flp);
    default:
    - BUG();
    + return -EINVAL;
    }
    }
    EXPORT_SYMBOL(generic_setlease);



    \
     
     \ /
      Last update: 2012-07-18 02:42    [W:4.653 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site