lkml.org 
[lkml]   [2012]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: Updated: [PATCH] hardening: add PROT_FINAL prot flag to mmap/mprotect
    From
    On Wed, Oct 3, 2012 at 2:18 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
    > On Wed, 03 Oct 2012 16:43:53 +0200
    > Ard Biesheuvel <ard.biesheuvel@gmail.com> wrote:
    >
    >> This patch adds support for the PROT_FINAL flag to
    >> the mmap() and mprotect() syscalls.
    >>
    >> The PROT_FINAL flag indicates that the requested set
    >> of protection bits should be final, i.e., it shall
    >> not be allowed for a subsequent mprotect call to
    >> set protection bits that were not set already.
    >>
    >> This is mainly intended for the dynamic linker,
    >> which sets up the address space on behalf of
    >> dynamic binaries. By using this flag, it can
    >> prevent exploited code from remapping read-only
    >> executable code or data sections read-write.
    >
    > Again: has this proposal been reviewed by the glibc maintainers? If
    > so, what was their position on it?

    Ard have you talked with them? I would expect it would be welcomed.
    Roland, do you know who would be the right person to ask about this
    for glibc? (patch: https://lkml.org/lkml/2012/10/3/262)

    > Also, you earlier stated that "It's a more direct version of PaX's
    > "MPROTECT" feature[1]". This is useful information. Please update the
    > changelog to describe that PaX feature and to describe the difference
    > between the two, and the reasons for that difference.

    AIUI, it's much more aggressive. It tries to protect all processes
    automatically (rather than this which is at the request of the
    process) and gets in the way of things like Java that expect to be
    able to do w+x mappings.

    > It sounds as though the PaX developers could provide useful review
    > input on this proposal. Do they know about it? If so, what is their
    > position?

    I'd rather not speak for them, but I understood it to be along the
    lines of "that's nice, we'll keep ours." :) (Now added to CC.)

    -Kees

    --
    Kees Cook
    Chrome OS Security


    \
     
     \ /
      Last update: 2012-10-04 00:41    [W:2.778 / U:0.976 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site