lkml.org 
[lkml]   [2006]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 001/001] /fs/proc/: 'larger than buffer size' memory accesses by clear_user()
    From: Adam B. Jerome <abj@novell.com>

    This patch addresses potential 'larger than buffer size' memory
    accesses by clear_user().
    Without this patch, this call to clear_user() can attempt to clear too
    many (tsz) bytes
    resulting in a wrong (-EFAULT) return code by read_kcore().
    Signed-off-by: Adam B. Jerome <abj@novell.com>
    ---

    I do not subscribe to the list. Please CC posted answers/comments CC me
    <abj@novell.com>.
    Thanks; -adam

    diff -urpN linux-2.6-git/fs/proc/kcore.c linux-2.6-cur/fs/proc/kcore.c
    --- linux-2.6-git/fs/proc/kcore.c 2006-07-07 15:39:23.000000000
    -0600
    +++ linux-2.6-cur/fs/proc/kcore.c 2006-07-07 16:11:58.000000000
    -0600
    @@ -384,7 +384,7 @@ read_kcore(struct file *file, char __use
    */
    if (n) {
    if (clear_user(buffer + tsz -
    n,
    - tsz -
    n))
    + n))
    return -EFAULT;
    }
    } else {

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-07-10 17:37    [W:4.121 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site