aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/security
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 16:05:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-26 16:05:11 -0400
commit0f776dc377f6c87f4e4d4a5f63602f33fb93b31e (patch)
tree25811858d15be4c526c6c887d8c41c0546edd6b9 /Documentation/security
parent015cd867e566e3a27b5e8062eb24eeaa4d77297f (diff)
parenta88b1672d4ddf9895eb53e6980926d5e960dea8e (diff)
Merge tag 'docs-for-linus' of git://git.lwn.net/linux
Pull documentation updates from Jonathan Corbet: "Some big changes this month, headlined by the addition of a new formatted documentation mechanism based on the Sphinx system. The objectives here are to make it easier to create better-integrated (and more attractive) documents while (eventually) dumping our one-of-a-kind, cobbled-together system for something that is widely used and maintained by others. There's a fair amount of information what's being done, why, and how to use it in: https://lwn.net/Articles/692704/ https://lwn.net/Articles/692705/ Closer to home, Documentation/kernel-documentation.rst describes how it works. For now, the new system exists alongside the old one; you should soon see the GPU documentation converted over in the DRM pull and some significant media conversion work as well. Once all the docs have been moved over and we're convinced that the rough edges (of which are are a few) have been smoothed over, the DocBook-based stuff should go away. Primary credit is to Jani Nikula for doing the heavy lifting to make this stuff actually work; there has also been notable effort from Markus Heiser, Daniel Vetter, and Mauro Carvalho Chehab. Expect a couple of conflicts on the new index.rst file over the course of the merge window; they are trivially resolvable. That file may be a bit of a conflict magnet in the short term, but I don't expect that situation to last for any real length of time. Beyond that, of course, we have the usual collection of tweaks, updates, and typo fixes" * tag 'docs-for-linus' of git://git.lwn.net/linux: (77 commits) doc-rst: kernel-doc: fix handling of address_space tags Revert "doc/sphinx: Enable keep_warnings" doc-rst: kernel-doc directive, fix state machine reporter docs: deprecate kernel-doc-nano-HOWTO.txt doc/sphinx: Enable keep_warnings Documentation: add watermark_scale_factor to the list of vm systcl file kernel-doc: Fix up warning output docs: Get rid of some kernel-documentation warnings doc-rst: add an option to ignore DocBooks when generating docs workqueue: Fix a typo in workqueue.txt Doc: ocfs: Fix typo in filesystems/ocfs2-online-filecheck.txt Documentation/sphinx: skip build if user requested specific DOCBOOKS Documentation: add cleanmediadocs to the documentation targets Add .pyc files to .gitignore Doc: PM: Fix a typo in intel_powerclamp.txt doc-rst: flat-table directive - initial implementation Documentation: add meta-documentation for Sphinx and kernel-doc Documentation: tiny typo fix in usb/gadget_multi.txt Documentation: fix wrong value in md.txt bcache: documentation formatting, edited for clarity, stripe alignment notes ...
Diffstat (limited to 'Documentation/security')
-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