aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2016-05-18 09:37:47 -0400
committerJonathan Corbet <corbet@lwn.net>2016-06-09 15:23:27 -0400
commitc9de4a82c852d621975f5978157f689e0550a48e (patch)
tree19cb2212c8ec79999357462149ed98354a51aacb
parent6d5244c72ec9cfff1390152ef7cc8540af0f2748 (diff)
docs: self-protection: rename "leak" to "exposure"
The meaning of "leak" can be both "untracked resource allocation" and "memory content disclosure". This document's use was entirely of the latter meaning, so avoid the confusion by using the Common Weakness Enumeration name for this: Information Exposure (CWE-200). Additionally adds a section on structure randomization. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rw-r--r--Documentation/security/self-protection.txt28
1 files changed, 18 insertions, 10 deletions
diff --git a/Documentation/security/self-protection.txt b/Documentation/security/self-protection.txt
index babd6378ec05..3010576c9fca 100644
--- a/Documentation/security/self-protection.txt
+++ b/Documentation/security/self-protection.txt
@@ -183,8 +183,9 @@ provide meaningful defenses.
183### Canaries, blinding, and other secrets 183### Canaries, blinding, and other secrets
184 184
185It should be noted that things like the stack canary discussed earlier 185It should be noted that things like the stack canary discussed earlier
186are technically statistical defenses, since they rely on a (leakable) 186are technically statistical defenses, since they rely on a secret value,
187secret value. 187and such values may become discoverable through an information exposure
188flaw.
188 189
189Blinding literal values for things like JITs, where the executable 190Blinding literal values for things like JITs, where the executable
190contents may be partially under the control of userspace, need a similar 191contents may be partially under the control of userspace, need a similar
@@ -199,8 +200,8 @@ working?) in order to maximize their success.
199Since the location of kernel memory is almost always instrumental in 200Since the location of kernel memory is almost always instrumental in
200mounting a successful attack, making the location non-deterministic 201mounting a successful attack, making the location non-deterministic
201raises the difficulty of an exploit. (Note that this in turn makes 202raises the difficulty of an exploit. (Note that this in turn makes
202the value of leaks higher, since they may be used to discover desired 203the value of information exposures higher, since they may be used to
203memory locations.) 204discover desired memory locations.)
204 205
205#### Text and module base 206#### Text and module base
206 207
@@ -222,14 +223,21 @@ become more difficult to locate.
222Much of the kernel's dynamic memory (e.g. kmalloc, vmalloc, etc) ends up 223Much of the kernel's dynamic memory (e.g. kmalloc, vmalloc, etc) ends up
223being relatively deterministic in layout due to the order of early-boot 224being relatively deterministic in layout due to the order of early-boot
224initializations. If the base address of these areas is not the same 225initializations. If the base address of these areas is not the same
225between boots, targeting them is frustrated, requiring a leak specific 226between boots, targeting them is frustrated, requiring an information
226to the region. 227exposure specific to the region.
228
229#### Structure layout
230
231By performing a per-build randomization of the layout of sensitive
232structures, attacks must either be tuned to known kernel builds or expose
233enough kernel memory to determine structure layouts before manipulating
234them.
227 235
228 236
229## Preventing Leaks 237## Preventing Information Exposures
230 238
231Since the locations of sensitive structures are the primary target for 239Since the locations of sensitive structures are the primary target for
232attacks, it is important to defend against leaks of both kernel memory 240attacks, it is important to defend against exposure of both kernel memory
233addresses and kernel memory contents (since they may contain kernel 241addresses and kernel memory contents (since they may contain kernel
234addresses or other sensitive things like canary values). 242addresses or other sensitive things like canary values).
235 243
@@ -250,8 +258,8 @@ sure structure holes are cleared.
250When releasing memory, it is best to poison the contents (clear stack on 258When releasing memory, it is best to poison the contents (clear stack on
251syscall return, wipe heap memory on a free), to avoid reuse attacks that 259syscall return, wipe heap memory on a free), to avoid reuse attacks that
252rely on the old contents of memory. This frustrates many uninitialized 260rely on the old contents of memory. This frustrates many uninitialized
253variable attacks, stack info leaks, heap info leaks, and use-after-free 261variable attacks, stack content exposures, heap content exposures, and
254attacks. 262use-after-free attacks.
255 263
256### Destination tracking 264### Destination tracking
257 265