Hi,
this is my first message here, I hope I'm not off-topic!
I've been reading [1], and tried on my gentoo system:
fser@regal /tmp$ ./aslr-test-without
main @ 0x4005da
doit @ 0x40059b
fser@regal /tmp$ ./aslr-test-without
main @ 0x4005da
doit @ 0x40059b
fser@regal /tmp$ ./aslr-test-without
main @ 0x4005da
doit @ 0x40059b
and
fser@regal /tmp$ ./aslr-test-withpie
main @ 0x468f410820
doit @ 0x468f4107e1
fser@regal /tmp$ ./aslr-test-withpie
main @ 0x6d8a0f9820
doit @ 0x6d8a0f97e1
fser@regal /tmp$ ./aslr-test-withpie
main @ 0x33eb5d8820
doit @ 0x33eb5d87e1
fser@regal /tmp$ ./aslr-test-withpie
main @ 0x769c4a5820
doit @ 0x769c4a57e1
I was under the impression that ASLR was enforced by the kernel, when
creating a new context for a process.
Reading the description of [1], I was expecting the adress of main (at
least) to be different.
Can someone explain me this behavior?
Thank you!
[1]
https://wiki.gentoo.org/wiki/Hardened/PaX_Quickstart#Address_Space_Layout_Randomization_.28ASLR.29
--
François
this is my first message here, I hope I'm not off-topic!
I've been reading [1], and tried on my gentoo system:
fser@regal /tmp$ ./aslr-test-without
main @ 0x4005da
doit @ 0x40059b
fser@regal /tmp$ ./aslr-test-without
main @ 0x4005da
doit @ 0x40059b
fser@regal /tmp$ ./aslr-test-without
main @ 0x4005da
doit @ 0x40059b
and
fser@regal /tmp$ ./aslr-test-withpie
main @ 0x468f410820
doit @ 0x468f4107e1
fser@regal /tmp$ ./aslr-test-withpie
main @ 0x6d8a0f9820
doit @ 0x6d8a0f97e1
fser@regal /tmp$ ./aslr-test-withpie
main @ 0x33eb5d8820
doit @ 0x33eb5d87e1
fser@regal /tmp$ ./aslr-test-withpie
main @ 0x769c4a5820
doit @ 0x769c4a57e1
I was under the impression that ASLR was enforced by the kernel, when
creating a new context for a process.
Reading the description of [1], I was expecting the adress of main (at
least) to be different.
Can someone explain me this behavior?
Thank you!
[1]
https://wiki.gentoo.org/wiki/Hardened/PaX_Quickstart#Address_Space_Layout_Randomization_.28ASLR.29
--
François