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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 14 Dec 2018 12:31:21 -0800
From:   tip-bot for Tzvetomir Stoyanov <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     rostedt@...dmis.org, tstoyanov@...are.com,
        linux-kernel@...r.kernel.org, kaslevs@...are.com,
        tglx@...utronix.de, hpa@...or.com, mingo@...nel.org,
        jolsa@...hat.com, acme@...hat.com
Subject: [tip:perf/core] tools lib traceevent: Add sanity check to
 is_timestamp_in_us()

Commit-ID:  51d0337d01985d0cccb6e41f976cc0dbe921fd84
Gitweb:     https://git.kernel.org/tip/51d0337d01985d0cccb6e41f976cc0dbe921fd84
Author:     Tzvetomir Stoyanov <tstoyanov@...are.com>
AuthorDate: Wed, 28 Nov 2018 14:55:52 -0500
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 29 Nov 2018 20:42:50 -0300

tools lib traceevent: Add sanity check to is_timestamp_in_us()

This patch adds a sanity check to is_timestamp_in_us() input parameter
trace_clock. It avoids a potential segfault in this function for the
case trace_clock is NULL.

Reported-by: Slavomir Kaslev <kaslevs@...are.com>
Signed-off-by: Tzvetomir Stoyanov <tstoyanov@...are.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Link: http://lkml.kernel.org/r/20181128145552.68c4f87b@gandalf.local.home
Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/lib/traceevent/event-parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index fbd6d6813fab..2b5cb33046ce 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -5409,7 +5409,7 @@ void tep_event_info(struct trace_seq *s, struct tep_event_format *event,
 
 static bool is_timestamp_in_us(char *trace_clock, bool use_trace_clock)
 {
-	if (!use_trace_clock)
+	if (!trace_clock || !use_trace_clock)
 		return true;
 
 	if (!strcmp(trace_clock, "local") || !strcmp(trace_clock, "global")

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ