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]
Date:   Sun, 11 Nov 2018 23:10:17 +0800
From:   Zhizhou Zhang <zhizhouzhang@...micro.com>
To:     <rostedt@...dmis.org>, <mingo@...hat.com>
CC:     <linux-kernel@...r.kernel.org>, <zhizhouzhang@...micro.com>,
        <zhizhouzh@...il.com>
Subject: [PATCH] ftrace: remove KASAN poison in ftrace_ops_test()

ftrace_ops_test() passed local varible parameter to hash_contains_ip(),
which could result KASAN stack-out-of-bounds warning.

Signed-off-by: Zhizhou Zhang <zhizhouzhang@...micro.com>
---
 kernel/trace/ftrace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index f536f60..6e11f90 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1522,6 +1522,8 @@ ftrace_ops_test(struct ftrace_ops *ops, unsigned long ip, void *regs)
 	rcu_assign_pointer(hash.filter_hash, ops->func_hash->filter_hash);
 	rcu_assign_pointer(hash.notrace_hash, ops->func_hash->notrace_hash);
 
+	kasan_unpoison_task_stack(current);
+
 	if (hash_contains_ip(ip, &hash))
 		ret = 1;
 	else
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ