Skip to main content
Definition Website Computer and Technology

Address Space Layout Randomization

Subject: Computer and Technology noun /ˈæd.res speɪs ˈleɪ.aʊt ˌræn.də.məˈzeɪ.ʃən/ 1 definition

  1. Definition (noun)

    Entry #112 · Updated

    Address Space Layout Randomization (ASLR) is an operating-system security mitigation that unpredictably shifts the virtual memory base addresses of a process's key regions—such as its executable image, shared libraries, heap, and stack—whenever a program launches or a system boots. By eliminating fixed, predictable memory layouts across executions, it prevents attackers from hardcoding reliable target addresses in memory-corruption exploits like buffer overflows and return-oriented programming (ROP), usually causing misdirected payloads to crash the process instead. ASLR acts as a probabilistic defense-in-depth layer rather than a vulnerability fix, meaning it does not prevent memory corruption itself and can be weakened or bypassed by information-disclosure leaks or low randomization entropy.

    Common Forms

    • User-Space ASLR: Randomizes the virtual addresses of user-mode application components—including the stack, heap, memory-mapped regions, shared libraries, and Position-Independent Executables (PIE)—at process creation to block application-level control-flow hijacking.

    • Kernel ASLR (KASLR): Relocates the operating system kernel image, loadable drivers, and internal kernel structures to randomized addresses at boot time to defend against local privilege-escalation exploits that rely on known kernel offsets.

    • Fine-Grained ASLR: Randomizes memory placement below the coarse segment level—such as permuting individual functions, basic blocks, or stack objects at compile, link, or load time—so that leaking a single pointer does not reveal the layout of an entire module.

    Example

    When a Linux web server compiled as a Position-Independent Executable starts with full ASLR enabled, the kernel maps its executable image and libc shared library to unpredictable virtual addresses such as 0x55a8c4100000 and 0x7f3b92e00000. If an attacker exploits a stack buffer overflow and overwrites a return address with a hardcoded libc gadget address observed during a previous run, execution typically lands on an unmapped page or unintended instruction and crashes the process (e.g., with SIGSEGV) instead of running the payload.