lkml.org 
[lkml]   [2020]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 0/4] aarch64: avoid mprotect(PROT_BTI|PROT_EXEC) [BZ #26831]
    Date
    * Will Deacon:

    > Is there real value in this seccomp filter if it only looks at mprotect(),
    > or was it just implemented because it's easy to do and sounds like a good
    > idea?

    It seems bogus to me. Everyone will just create alias mappings instead,
    just like they did for the similar SELinux feature. See “Example code
    to avoid execmem violations” in:

    <https://www.akkadia.org/drepper/selinux-mem.html>

    As you can see, this reference implementation creates a PROT_WRITE
    mapping aliased to a PROT_EXEC mapping, so it actually reduces security
    compared to something that generates the code in an anonymous mapping
    and calls mprotect to make it executable.

    Furthermore, it requires unusual cache flushing code on some AArch64
    implementations (a requirement that is not shared by any Linux other
    architecture to which libffi has been ported), resulting in
    hard-to-track-down real-world bugs.

    Thanks,
    Florian
    --
    Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
    Commercial register: Amtsgericht Muenchen, HRB 153243,
    Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill

    \
     
     \ /
      Last update: 2020-11-04 10:30    [W:4.039 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site