lkml.org 
[lkml]   [2010]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[033/116] sysctl: require CAP_SYS_RAWIO to set mmap_min_addr
    2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

    From: Kees Cook <kees.cook@canonical.com>

    commit 0e1a6ef2dea88101b056b6d9984f3325c5efced3 upstream.

    Currently the mmap_min_addr value can only be bypassed during mmap when
    the task has CAP_SYS_RAWIO. However, the mmap_min_addr sysctl value itself
    can be adjusted to 0 if euid == 0, allowing a bypass without CAP_SYS_RAWIO.
    This patch adds a check for the capability before allowing mmap_min_addr to
    be changed.

    Signed-off-by: Kees Cook <kees.cook@canonical.com>
    Acked-by: Serge Hallyn <serue@us.ibm.com>
    Signed-off-by: James Morris <jmorris@namei.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    security/min_addr.c | 3 +++
    1 file changed, 3 insertions(+)

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

    + if (!capable(CAP_SYS_RAWIO))
    + return -EPERM;
    +
    ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);

    update_mmap_min_addr();



    \
     
     \ /
      Last update: 2010-03-31 02:15    [W:4.036 / U:0.128 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site