kernel-hardening.lists.openwall.com archive mirror
 help / color / mirror / Atom feed
* [kernel-hardening] [PATCH v2 0/4] introduce post-init read-only memory
@ 2015-11-25 23:31 Kees Cook
  2015-11-25 23:31 ` [kernel-hardening] [PATCH v2 1/4] init: create cmdline param to disable readonly Kees Cook
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Kees Cook @ 2015-11-25 23:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kees Cook, Andy Lutomirski, H. Peter Anvin, Michael Ellerman,
	Mathias Krause, Ingo Molnar, Thomas Gleixner, x86, Arnd Bergmann,
	PaX Team, Emese Revfy, kernel-hardening, linux-arch

One of the easiest ways to protect the kernel from attack is to reduce
the internal attack surface exposed when a "write" flaw is available. By
making as much of the kernel read-only as possible, we reduce the
attack surface.

Many things are written to only during __init, and never changed
again. These cannot be made "const" since the compiler will do the wrong
thing (we do actually need to write to them). Instead, move these items
into a memory region that will be made read-only during mark_rodata_ro()
which happens after all kernel __init code has finished.

This introduces __ro_after_init as a way to mark such memory, and uses
it on the x86 vDSO to kill an extant kernel exploitation method. Also
adds a new kernel parameter to help debug future use and adds an lkdtm
test to check the results.

-Kees

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-12-09 19:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25 23:31 [kernel-hardening] [PATCH v2 0/4] introduce post-init read-only memory Kees Cook
2015-11-25 23:31 ` [kernel-hardening] [PATCH v2 1/4] init: create cmdline param to disable readonly Kees Cook
2015-11-26  0:37   ` [kernel-hardening] " PaX Team
2015-11-26  0:44   ` [kernel-hardening] " Greg KH
2015-11-26  7:51   ` [kernel-hardening] " Ingo Molnar
2015-11-30 21:52     ` Kees Cook
2015-11-30 22:24       ` Russell King - ARM Linux
2015-11-30 22:34         ` Kees Cook
2015-12-01  7:24         ` Ingo Molnar
2015-12-01  7:19       ` Heiko Carstens
2015-11-25 23:31 ` [kernel-hardening] [PATCH v2 2/4] introduce post-init read-only memory Kees Cook
2015-11-26  0:15   ` [kernel-hardening] " PaX Team
2015-11-30 22:24     ` H. Peter Anvin
2015-12-09 19:35       ` Kees Cook
2015-11-25 23:31 ` [kernel-hardening] [PATCH v2 3/4] lkdtm: verify that __ro_after_init works correctly Kees Cook
2015-11-25 23:31 ` [kernel-hardening] [PATCH v2 4/4] x86, vdso: mark vDSO read-only after init Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).