lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170504133209.3053-1-danielmicay@gmail.com>
Date:   Thu,  4 May 2017 09:32:09 -0400
From:   Daniel Micay <danielmicay@...il.com>
To:     Kees Cook <keescook@...omium.org>,
        Arjan van Ven <arjan@...ux.intel.com>,
        Ingo Molnar <mingo@...e.hu>,
        kernel-hardening@...ts.openwall.com,
        LKML <linux-kernel@...r.kernel.org>
Cc:     Daniel Micay <danielmicay@...il.com>, stable@...r.kernel.org
Subject: [PATCH] use get_random_long for the per-task stack canary

The stack canary is an unsigned long and should be fully initialized to
random data rather than only 32 bits of random data.

Cc: stable@...r.kernel.org
Signed-off-by: Daniel Micay <danielmicay@...il.com>
---
 kernel/fork.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index 56d85fd81411..ff84ff82f56a 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -537,7 +537,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
 	set_task_stack_end_magic(tsk);
 
 #ifdef CONFIG_CC_STACKPROTECTOR
-	tsk->stack_canary = get_random_int();
+	tsk->stack_canary = get_random_long();
 #endif
 
 	/*
-- 
2.12.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ