All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* + sh64-ascii-armor-the-sh64-boot-init-stack-canary.patch added to -mm tree
@ 2017-05-24 21:22 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-05-24 21:22 UTC (permalink / raw
  To: riel, catalin.marinas, danielmicay, hpa, keescook, luto, mingo,
	tytso, ysato, mm-commits


The patch titled
     Subject: sh64: ascii armor the sh64 boot init stack canary
has been added to the -mm tree.  Its filename is
     sh64-ascii-armor-the-sh64-boot-init-stack-canary.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/sh64-ascii-armor-the-sh64-boot-init-stack-canary.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/sh64-ascii-armor-the-sh64-boot-init-stack-canary.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Rik van Riel <riel@redhat.com>
Subject: sh64: ascii armor the sh64 boot init stack canary

Use the ascii-armor canary to prevent unterminated C string overflows from
being able to successfully overwrite the canary, even if they somehow
obtain the canary value.

Inspired by execshield ascii-armor and Daniel Micay's linux-hardened tree.

Link: http://lkml.kernel.org/r/20170524123446.78510066@annuminas.surriel.com
Signed-off-by: Rik van Riel <riel@redhat.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Daniel Micay <danielmicay@gmail.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/sh/include/asm/stackprotector.h |    1 +
 1 file changed, 1 insertion(+)

diff -puN arch/sh/include/asm/stackprotector.h~sh64-ascii-armor-the-sh64-boot-init-stack-canary arch/sh/include/asm/stackprotector.h
--- a/arch/sh/include/asm/stackprotector.h~sh64-ascii-armor-the-sh64-boot-init-stack-canary
+++ a/arch/sh/include/asm/stackprotector.h
@@ -19,6 +19,7 @@ static __always_inline void boot_init_st
 	/* Try to get a semi random initial value. */
 	get_random_bytes(&canary, sizeof(canary));
 	canary ^= LINUX_VERSION_CODE;
+	canary &= CANARY_MASK;
 
 	current->stack_canary = canary;
 	__stack_chk_guard = current->stack_canary;
_

Patches currently in -mm which might be from riel@redhat.com are

randomstackprotect-introduce-get_random_canary-function.patch
forkrandom-use-get_random_canary-to-set-tsk-stack_canary.patch
x86-ascii-armor-the-x86_64-boot-init-stack-canary.patch
arm64-ascii-armor-the-arm64-boot-init-stack-canary.patch
sh64-ascii-armor-the-sh64-boot-init-stack-canary.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-24 21:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-24 21:22 + sh64-ascii-armor-the-sh64-boot-init-stack-canary.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.