Search code examples
glibcaslr

ASLR and address space for glibc


Take two functions in the libc.so.6 listing, for example:

setvbuf  0017a3f0
system   0014f760

The two are 0x2ac90 distant.

Upon execution with ASLR enabled, will the functions be called from addresses equally distant?


Solution

  • Upon execution with ASLR enabled, will the functions be called from addresses equally distant?

    For this particular build of GLIBC, yes.

    The load segment in which all code resides is mmaped as a whole, so the distance between various parts within that segment remains the same.