linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] stackprotector: ascii armor the stack canary
@ 2017-05-24 15:57 riel
  2017-05-24 15:57 ` [PATCH 1/5] random,stackprotect: introduce get_random_canary function riel
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: riel @ 2017-05-24 15:57 UTC (permalink / raw)
  To: linux-kernel
  Cc: danielmicay, tytso, keescook, hpa, luto, mingo, x86,
	linux-arm-kernel, catalin.marinas, linux-sh, ysato,
	kernel-hardening

Zero out the first byte of the stack canary value on 64 bit systems,
in order to mitigate unterminated C string overflows.

The null byte both prevents C string functions from reading the
canary, and from writing it if the canary value were guessed or
obtained through some other means.
    
Reducing the entropy by 8 bits is acceptable on 64-bit systems,
which will still have 56 bits of entropy left, but not on 32
bit systems, so the "ascii armor" canary is only implemented on
64-bit systems.

Inspired by the "ascii armor" code in execshield and Daniel Micay's
linux-hardened tree.

Also see https://github.com/thestinger/linux-hardened/

v2:
 - improve changelogs
 - address Ingo's coding style comments


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

end of thread, other threads:[~2017-09-20 15:03 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24 15:57 [PATCH v2 0/5] stackprotector: ascii armor the stack canary riel
2017-05-24 15:57 ` [PATCH 1/5] random,stackprotect: introduce get_random_canary function riel
2017-05-24 16:15   ` Kees Cook
2017-05-24 15:57 ` [PATCH 2/5] fork,random: use get_random_canary to set tsk->stack_canary riel
2017-05-24 16:16   ` Kees Cook
2017-05-24 15:57 ` [PATCH 3/5] x86: ascii armor the x86_64 boot init stack canary riel
2017-05-24 16:16   ` Kees Cook
2017-05-24 15:57 ` [PATCH 4/5] arm64: ascii armor the arm64 " riel
2017-05-24 16:16   ` Kees Cook
2017-05-24 15:57 ` [PATCH 5/5] sh64: ascii armor the sh64 " riel
2017-05-24 16:34 ` Rik van Riel
2017-05-24 16:35   ` Kees Cook
2017-09-19 17:16 ` [kernel-hardening] [PATCH v2 0/5] stackprotector: ascii armor the " Solar Designer
2017-09-19 20:22   ` Kees Cook
2017-09-19 21:10   ` Daniel Micay
2017-09-20 11:18   ` Yann Droneaud
2017-09-20 15:03     ` Solar Designer

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).