Linux: Disable Address space layout randomization (ASLR) on SLES and Ubuntu

Address space layout randomization (ASLR) is a method to make hacker’s life more difficult by randomizing the position of the heap, stack, executable and libraries in the address space of the process. ASLR is enabled by default in Linux since kernel version 2.6.12.

It’s a nice security feature. Unfortunately it does break some software. If you run some software having this issue, you can switch off ASLR using the following:

sudo bash -c "echo 0 > /proc/sys/kernel/randomize_va_space"

to check the current value of the ASLR setting you can use the following:

cat /proc/sys/kernel/randomize_va_space

Leave a Reply

Your email address will not be published. Required fields are marked *