From: Nick Desaulniers Date: Wed, 10 Feb 2021 08:28:05 +0000 (+0530) Subject: tracing: do not leak kernel addresses X-Git-Tag: MMI-QSAS30.62-33-12^0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=refs%2Fheads%2Fandroid-10-release-qsas30;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git tracing: do not leak kernel addresses This likely breaks tracing tools like trace-cmd. It logs in the same format but now addresses are all 0x0. Mot-CRs-fixed:(CR) CVE-Fixed:CVE-2017-0630 Bug: 34277115 Change-Id: Ie837ab27d8f4cc164828ad70a916f3de688056cf Reviewed-on: https://gerrit.mot.com/1875873 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Reviewed-by: Srikanth A R Reviewed-by: Ravikumar Vembu Reviewed-by: Yinjun Chen Tested-by: Yinjun Chen Submit-Approved: Yinjun Chen --- diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c index ad1d6164e946..e82cff5c842c 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%lx : \"", 0L); /* * Tabs and new lines need to be converted.