[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180725202238.165314-1-salyzyn@android.com>
Date: Wed, 25 Jul 2018 13:22:36 -0700
From: Mark Salyzyn <salyzyn@...roid.com>
To: linux-kernel@...r.kernel.org
Cc: Nick Desaulniers <ndesaulniers@...gle.com>,
Mark Salyzyn <salyzyn@...roid.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>, kernel-team@...roid.com,
stable@...r.kernel.org
Subject: [PATCH] tracing: do not leak kernel addresses
From: Nick Desaulniers <ndesaulniers@...gle.com>
Switch from 0x%lx to 0x%pK to print the kernel addresses.
Fixes: CVE-2017-0630
Signed-off-by: Mark Salyzyn <salyzyn@...roid.com>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: <kernel-team@...roid.com>
Cc: <stable@...r.kernel.org> # 3.18, 4.4, 4.9, 4.14
Cc: <linux-kernel@...r.kernel.org>
---
kernel/trace/trace_printk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c
index ad1d6164e946..93698023baf1 100644
--- a/kernel/trace/trace_printk.c
+++ b/kernel/trace/trace_printk.c
@@ -304,7 +304,7 @@ static int t_show(struct seq_file *m, void *v)
if (!*fmt)
return 0;
- seq_printf(m, "0x%lx : \"", *(unsigned long *)fmt);
+ seq_printf(m, "0x%pK : \"", *(unsigned long *)fmt);
/*
* Tabs and new lines need to be converted.
--
2.18.0.233.g985f88cf7e-goog
Powered by blists - more mailing lists