address space layout randomization
Address space layout randomization (ASLR) is a computer security technique involved in preventing exploitation of memory corruption vulnerabilities.[1] In order to prevent an attacker from reliably redirecting code execution to a particular exploited function in memory, ASLR 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.[1] When applied to the kernel, this technique is called kernel address space layout randomization (KASLR).[1]
Address space layout randomization (ASLR) is a computer security technique involved in preventing exploitation of memory corruption vulnerabilities.[1] In order to prevent an attacker from reliably redirecting code execution to a particular exploited function in memory, ASLR 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.[1] When applied to the kernel, this technique is called kernel address space layout randomization (KASLR).[1] N (total amount of entropy: N = (E_s-A_s) + (E_m-A_m) + (E_x-A_x) + (E_h-A_h)\, ) To calculate the probability of an attacker succeeding, a number of attempts carried out without being interrupted by a signature-based IPS, law enforcement, or other factor must be assumed; in the case of brute forcing, the daemon cannot be restarted.[src] The number of relevant bits and how many are being attacked in each attempt must also be calculated, leaving however many bits the attacker has to defeat.[src] The following formulas represent the probability of success for a given set of attempts on bits of entropy.[src] g \left ( \alpha\, \right ) = 1 - { \left ( 1 - {2^{-N}} \right ) ^ \alpha\,} \,\text{ if } 0 \le \, \alpha\, (isolated guessing; address space is re-randomized after each attempt) b \left ( \alpha\, \right ) = \frac{\alpha\,} \,\text{ if } 0 \le \, \alpha\, \le \, {2^N} (systematic brute forcing on copies of the program with the same address space) In many systems, 2^N can be in the thousands or millions.[1] On 32-bit systems, a typical amount of entropy N is 8 bits.[src] For 2004 computer speeds, Shacham and co-workers state "...[src] 16 bits of address randomization can be defeated by a brute force attack within minutes." (The authors' statement depends on the ability to attack the same application multiple times without any delay.[1] Proper implementations of ASLR, like that included in grsecurity, provide several methods to make such brute force attacks infeasible.[src] One method involves preventing an executable from executing for a configurable amount of time if it has crashed a certain number of times.) On 64-bit systems, these numbers typically reach the millions at least.[src] Android, and possibly other systems, implement Library Load Order Randomization, a form of ASLR which randomizes the order in which libraries are loaded.[src] This supplies very little entropy.[src] An approximation of the number of bits of entropy supplied per needed library appears below; this does not yet account for varied library sizes, so the actual entropy gained is really somewhat higher.[src] Attackers usually need only one library; the math is more complex with multiple libraries, and shown below as well.[src] The case of an attacker using only one library is a simplification of the more complex formula for l = 1 .[src] (number of libraries loaded) (number of libraries used by the attacker) E_m = \begin{cases} \log_2 \left (l \right ) &\text{ if } \beta\, = 1, l \ge \, 1 \\ \sum_{i=l}^{l - \left ( \beta\, - 1 \right )} \log_2 \left (i \right ) &\text{ if } \beta\, \ge \, 1, l \ge \, 1 \end{cases} These values tend to be low even for large values of , most importantly since attackers typically can use only the C standard library and thus one can often assume that \beta\, = 1 .[src] However, even for a small number of libraries there are a few bits of entropy gained here; it is thus potentially interesting to combine library load order randomization with VMA address randomization to gain a few extra bits of entropy.[1] These extra bits of entropy will not apply to other mmap() segments, only libraries.[src] ==== Kernel address space layout randomization==== Kernel address space layout randomization (KASLR) enables address space randomization for the Linux kernel image by randomizing where the kernel code is placed at boot time.[1] KASLR was merged into the Linux kernel mainline in kernel version 3.14, released on 30 March 2014.[src] When compiled in, it can be disabled at boot time by specifying as one of the kernel's boot parameters.[src] There are several side-channel attacks in x86 processors that could leak kernel addresses.[src] In late 2017, kernel page-table isolation (KPTI aka KAISER) was developed to defeat these attacks.[src] However, this method cannot protect against side-channel attacks utilizing collisions in branch predictor structures.[src] , finer grained kernel address space layout randomization (or function granular KASLR, FGKASLR) is a planned extension of KASLR to randomize down to the function level by placing functions in separate sections and reordering them at boot time.[1] === OpenBSD === In 2003, OpenBSD became the first mainstream operating system to support a strong form of ASLR and to activate it by default.[src] OpenBSD completed its ASLR support in 2008 when it added support for PIE binaries.[src] OpenBSD 4.4's malloc(3) was designed to improve security by taking advantage of ASLR and gap page features implemented as part of OpenBSD's mmap system call, and to detect use-after-free bugs.[src] Released in 2013, OpenBSD 5.3 was the first mainstream operating system to enable position-independent executables by default on multiple hardware platforms, and OpenBSD 5.7 activated position-independent static binaries (Static-PIE) by default.[src] ==Exploitation== A side-channel attack utilizing branch target buffer was demonstrated to bypass ASLR protection.[src] In 2017, an attack named "ASLR⊕Cache" was demonstrated which could defeat ASLR in a web browser using JavaScript.[src] Bypassing PaX ASLR protection On the effectiveness of address space layout randomization Test Applications (or libraries) for their ASLR and DEP support ASLR Smack & Laugh Reference[1]
37 sentences · 37 cited inline · 1 references stored
References
- address space layout randomization · retrieved 2026-11-23 · rev 1365510028
Cite this reference
MLA "address space layout randomization." 2026-11-23. https://en.wikipedia.org/w/index.php?oldid=1365510028. Accessed 02 December 2026.
Chicago "address space layout randomization." 2026-11-23. https://en.wikipedia.org/w/index.php?oldid=1365510028.
APA encyclopegia.org. (2026). address space layout randomization. Retrieved December 2, 2026, from https://en.wikipedia.org/w/index.php?oldid=1365510028
Cite this article
MLA
"address space layout randomization." encyclopegia.org, 2026, https://encyclopegia.org/wiki/address-space-layout-randomization. Accessed 02 December 2026.
Chicago
"address space layout randomization." encyclopegia.org. Accessed December 2, 2026. https://encyclopegia.org/wiki/address-space-layout-randomization.
APA
encyclopegia.org. (2026). address space layout randomization. Retrieved December 2, 2026, from https://encyclopegia.org/wiki/address-space-layout-randomization
Accessed December 2, 2026 · CC BY-SA 4.0 · citation page · JSON
Claims
| Predicate | Value | Source |
|---|---|---|
| release date | 2014-03-30 | Wikipedia |
| release date | 2013 | Wikipedia |
| definition | a computer security technique involved in preventing exploitation of memory corruption vulnerabilities. | article body |
| year mentioned | 2004 | article body |
| release date | 30 March 2014 | article body |
| year mentioned | 2017 | article body |
| year mentioned | 2003 | article body |
| date opened | 2008 | article body |