Programster's Blog

Tutorials focusing on Linux, programming, and open-source

How To Disable ASLR

After reading a few comments stating the need to disable ASLR on Ryzen, I decided to disable it.

What is ASLR?

ASLR stands for address space layout randomization, and it is a security technique used to prevent the exploitation of memory corruption vulnerabilities. It randomly arranges the address space positions of key data areas of a process, including the base of the executable and the positions of the stack, heap and libraries.

Steps To Disable ASLR

Run these commands as root.

# disable in current session
echo 0 | tee /proc/sys/kernel/randomize_va_space

# make change permanent (across reboots)
echo "kernel.randomize_va_space = 0" > /etc/sysctl.d/01-disable-aslr.conf

References

Last updated: 16th August 2018
First published: 16th August 2018

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch