Address Space Layout Randomization (ASLR)
A memory protection that loads a process's stack, heap, libraries and code at unpredictable addresses, so exploit code has to guess where its targets are.
Address space layout randomization is an operating system defence that places the main regions of a process, such as the stack, the heap, shared libraries and, where the program is built for it, the executable itself, at addresses that change between runs or boots. It first appeared in the PaX project for Linux in 2001 and is now built into mainstream operating systems.
Many memory corruption exploits, including those that follow a buffer overflow, redirect execution to a known address: injected code, or existing library code reused through return-oriented programming. ASLR turns those addresses into guesses. It is commonly paired with data execution prevention: DEP stops injected code from running, and ASLR makes reusable code hard to find. Its strength depends on entropy and secrecy. A memory disclosure bug that leaks one address can reveal the layout of a whole region, and low randomisation on some 32-bit systems has allowed addresses to be guessed by repeated attempts.
Exam relevance: a scenario describing randomised memory addresses as a defence against exploitation is likely to point to ASLR. Candidates are expected to see it as a mitigation that raises the cost of exploiting memory flaws rather than a fix for them, and to distinguish it from DEP and from input validation, which address different parts of the same attack.