lkml.org 
[lkml]   [2016]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.16 296/346] fix minor infoleak in get_user_ex()
    3.16.39-rc1 review patch.  If anyone has any objections, please let me know.

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

    From: Al Viro <viro@ZenIV.linux.org.uk>

    commit 1c109fabbd51863475cd12ac206bdd249aee35af upstream.

    get_user_ex(x, ptr) should zero x on failure. It's not a lot of a leak
    (at most we are leaking uninitialized 64bit value off the kernel stack,
    and in a fairly constrained situation, at that), but the fix is trivial,
    so...

    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    [ This sat in different branch from the uaccess fixes since mid-August ]
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    arch/x86/include/asm/uaccess.h | 6 +++++-
    1 file changed, 5 insertions(+), 1 deletion(-)

    --- a/arch/x86/include/asm/uaccess.h
    +++ b/arch/x86/include/asm/uaccess.h
    @@ -391,7 +391,11 @@ do { \
    #define __get_user_asm_ex(x, addr, itype, rtype, ltype) \
    asm volatile("1: mov"itype" %1,%"rtype"0\n" \
    "2:\n" \
    - _ASM_EXTABLE_EX(1b, 2b) \
    + ".section .fixup,\"ax\"\n" \
    + "3:xor"itype" %"rtype"0,%"rtype"0\n" \
    + " jmp 2b\n" \
    + ".previous\n" \
    + _ASM_EXTABLE_EX(1b, 3b) \
    : ltype(x) : "m" (__m(addr)))

    #define __put_user_nocheck(x, ptr, size) \
    \
     
     \ /
      Last update: 2016-11-14 04:29    [W:4.101 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site