DragonFly BSD
DragonFly commits List (threaded) for 2012-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: rtld: add RELRO support


From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 16 Jan 2012 10:49:22 -0800 (PST)

commit 007f494e0a1eec2db98703bbe5e4b29a890c01d1
Author: John Marino <draco@marino.st>
Date:   Mon Jan 16 15:39:15 2012 +0100

    rtld: add RELRO support
    
    "RELRO" means PLT (partial) or PLT+GOT (full) data is shifted to a
    dedicated page by the linker which triggers the dynamic linker to
    protect the page by setting the memory to read-only.  This feature
    assists in detecting memory corruption and also prevents some types
    of buffer overflow exploits.
    
    Until now, this feature was only supported by Linux's glibc.  No BSD
    had relro support in their dynamic linker.  I proposed the patch and
    it was reviewed by a FreeBSD dynamic linker expert.  Attempts to
    access protected data currently results in a bus error signal, but the
    next commit will update the kernel trap files to cause the segfault
    signal to be emitted instead.
    
    Reviewed-by: Kostik Belousov

Summary of changes:
 libexec/rtld-elf/map_object.c |   14 ++++++++++++++
 libexec/rtld-elf/rtld.c       |   20 ++++++++++++++++++--
 libexec/rtld-elf/rtld.h       |    2 ++
 sys/sys/elf_common.h          |    5 +++--
 4 files changed, 37 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/007f494e0a1eec2db98703bbe5e4b29a890c01d1


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]