[lkml]   [2010]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[36/39] mmap_min_addr check CAP_SYS_RAWIO only for write

    2.6.33-stable review patch. If anyone has any objections, please let us know.

    From: Kees Cook <>

    commit 4ae69e6b718589abe97c9625ccbb1e0bc95a8c0e upstream.

    Redirecting directly to lsm, here's the patch discussed on lkml:

    The mmap_min_addr value is useful information for an admin to see without
    being root ("is my system vulnerable to kernel NULL pointer attacks?") and
    its setting is trivially easy for an attacker to determine by calling
    mmap() in PAGE_SIZE increments starting at 0, so trying to keep it private
    has no value.

    Only require CAP_SYS_RAWIO if changing the value, not reading it.

    Comment from Serge :

    Me, I like to write my passwords with light blue pen on dark blue
    paper, pasted on my window - if you're going to get my password, you're
    gonna get a headache.

    Signed-off-by: Kees Cook <>
    Acked-by: Serge Hallyn <>
    Signed-off-by: James Morris <>
    (cherry picked from commit 822cceec7248013821d655545ea45d1c6a9d15b3)
    Signed-off-by: Greg Kroah-Hartman <>

    security/min_addr.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/security/min_addr.c
    +++ b/security/min_addr.c
    @@ -33,7 +33,7 @@ int mmap_min_addr_handler(struct ctl_tab
    int ret;

    - if (!capable(CAP_SYS_RAWIO))
    + if (write && !capable(CAP_SYS_RAWIO))
    return -EPERM;

    ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);

     \ /
      Last update: 2010-05-25 01:29    [W:0.022 / U:91.072 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site