Variable at random location in memory?
IIRC global variables like PATH used to exist at a certain memory address. But now it seems you never know where it is. I made a program before that printed out the address of a variable, and when I use it now it keeps showing up seemingly random addresses.
Code:
/* getenvaddr.c */ Code:
[root@garanka laboratory] # ./getenvaddr PATH |
This may be part of the Execshield implementation:
cat /proc/sys/kernel/exec-shield-randomize 0 — Randomized VM mapping is disabled 1 — Randomized VM mapping is enabled Update: on later kernels, the value may be in: cat /proc/sys/kernel/randomize_va_space |
Yeah I've read a little bit and it seems that we now have ASLR in Linux. On an interesting note this will also come to Vista (in a lesser secure way it seems, though).
|
All times are GMT -5. The time now is 04:43 AM. |