[0/3] Improved ASLR

Message ID 20201125113632.6486-1-toiwoton@gmail.com
Headers
Series Improved ASLR |

Message

Topi Miettinen Nov. 25, 2020, 11:36 a.m. UTC
  Problem with using sbrk() for allocations is that the location of the
memory is relatively predicatable since it's always located next to
data segment. This series makes malloc() and TCB use mmap() instead,
except when instructed by tunable glibc.malloc.use_sbrk.

Topi Miettinen (3):
  csu: randomize location of TCB
  malloc: use mmap() to improve ASLR
  dl-sysdep: disable remaining calls to sbrk()

 csu/libc-tls.c                          | 48 +++++++++++++++++++++----
 elf/dl-sysdep.c                         | 11 +++++-
 elf/dl-tunables.list                    |  7 ++++
 malloc/arena.c                          | 11 ++++--
 malloc/morecore.c                       | 10 ++++++
 manual/tunables.texi                    |  5 +++
 sysdeps/unix/sysv/linux/dl-sysdep.c     | 10 ++++++
 sysdeps/unix/sysv/linux/mmap64.c        | 19 ++++++++++
 sysdeps/unix/sysv/linux/mmap_internal.h |  5 +++
 9 files changed, 117 insertions(+), 9 deletions(-)


base-commit: aa7e05c3043302403e91b85c4aea39e0aac6c7c8