linux/kernel/trace
Steven Rostedt (Red Hat) 3193899d4d tracing: Fix possible out of bounds memory access when parsing enums
The code that replaces the enum names with the enum values in the
tracepoints' format files could possible miss the end of string nul
character. This was caused by processing things like backslashes, quotes
and other tokens. After processing the tokens, a check for the nul
character needed to be done before continuing the loop, because the loop
incremented the pointer before doing the check, which could bypass the nul
character.

Link: http://lkml.kernel.org/r/552E661D.5060502@oracle.com

Reported-by: Sasha Levin <sasha.levin@oracle.com> # via KASan
Tested-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Fixes: 0c564a538a "tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values"
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-04-17 10:34:43 -04:00
..
blktrace.c Merge branch 'for-3.19/core' of git://git.kernel.dk/linux-block 2014-12-13 14:14:23 -08:00
ftrace.c ftrace/x86: Let dynamic trampolines call ops->func even for dynamic fops 2015-04-02 15:43:33 -04:00
Kconfig tracing: Add enum_map file to show enums that have been mapped 2015-04-08 10:58:35 -04:00
Makefile Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2015-02-11 17:42:32 -08:00
power-traces.c PM / sleep: export suspend_resume trace event 2015-01-30 02:10:41 +01:00
ring_buffer.c ring-buffer: Remove duplicate use of '&' in recursive code 2015-03-30 13:36:31 -04:00
ring_buffer_benchmark.c trace: Use 64-bit timekeeping 2015-01-28 11:02:05 -05:00
rpm-traces.c PM / Runtime: Introduce trace points for tracing rpm_* functions 2011-09-27 22:53:27 +02:00
trace.c tracing: Add enum_map file to show enums that have been mapped 2015-04-08 10:58:35 -04:00
trace.h tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values 2015-04-08 09:39:56 -04:00
trace_benchmark.c tracing: Only calculate stats of tracepoint benchmarks for 2^32 times 2014-06-06 00:41:38 -04:00
trace_benchmark.h tracing: Add tracepoint benchmark tracepoint 2014-05-29 22:49:54 -04:00
trace_branch.c tracing: Remove unneeded includes of debugfs.h and fs.h 2015-01-22 11:19:48 -05:00
trace_clock.c tracing: Fix wraparound problems in "uptime" trace clock 2014-07-21 09:56:12 -04:00
trace_entries.h tracing: %pF is only for function pointers 2015-03-25 08:57:22 -04:00
trace_event_perf.c perf: Avoid horrible stack usage 2015-01-14 15:11:45 +01:00
trace_events.c tracing: Fix possible out of bounds memory access when parsing enums 2015-04-17 10:34:43 -04:00
trace_events_filter.c tracing: Allow NOT to filter AND and OR clauses 2014-12-03 10:00:27 -05:00
trace_events_filter_test.h tracing/filter: Add startup tests for events filter 2011-08-19 14:35:59 -04:00
trace_events_trigger.c trace: Replace single-character seq_puts with seq_putc 2014-11-14 07:55:55 -05:00
trace_export.c tracing: remove ftrace:function TRACE_EVENT_FL_USE_CALL_FILTER flag 2015-03-25 08:57:23 -04:00
trace_functions.c tracing/trivial: Fix typos and make an int into a bool 2014-11-20 10:05:36 -05:00
trace_functions_graph.c tracing: Handle ftrace_dump() atomic context in graph_trace_open() 2015-04-16 09:32:17 -04:00
trace_irqsoff.c tracing: Remove unneeded includes of debugfs.h and fs.h 2015-01-22 11:19:48 -05:00
trace_kdb.c KGDB/KDB fixes and cleanups 2015-01-09 20:51:10 -08:00
trace_kprobe.c trace: Don't use __weak in header files 2015-03-25 08:57:23 -04:00
trace_mmiotrace.c tracing: Do not check return values of trace_seq_p*() for mmio tracer 2014-11-19 15:25:44 -05:00
trace_nop.c tracing: Remove unneeded includes of debugfs.h and fs.h 2015-01-22 11:19:48 -05:00
trace_output.c tracing: Add array printing helper 2015-01-28 10:34:47 -05:00
trace_output.h tracing: Add trace_seq_has_overflowed() and trace_handle_return() 2014-11-19 15:25:39 -05:00
trace_printk.c tracing: Use IS_ERR() check for return value of tracing_init_dentry() 2015-01-22 11:19:49 -05:00
trace_probe.c trace: Don't use __weak in header files 2015-03-25 08:57:23 -04:00
trace_probe.h trace: Don't use __weak in header files 2015-03-25 08:57:23 -04:00
trace_sched_switch.c tracing: Remove unneeded includes of debugfs.h and fs.h 2015-01-22 11:19:48 -05:00
trace_sched_wakeup.c tracing: Remove unneeded includes of debugfs.h and fs.h 2015-01-22 11:19:48 -05:00
trace_selftest.c Seems that Peter Zijlstra added a new check that is making old 2014-10-12 07:28:55 -04:00
trace_selftest_dynamic.c ftrace: Add self-tests for multiple function trace users 2011-05-18 19:24:51 -04:00
trace_seq.c tracing: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:37 -08:00
trace_stack.c tracing: Use IS_ERR() check for return value of tracing_init_dentry() 2015-01-22 11:19:49 -05:00
trace_stat.c tracing: Use IS_ERR() check for return value of tracing_init_dentry() 2015-01-22 11:19:49 -05:00
trace_stat.h tracing/stat: Add stat_release() callback 2009-07-10 12:14:05 +02:00
trace_syscalls.c perf: Avoid horrible stack usage 2015-01-14 15:11:45 +01:00
trace_uprobe.c trace: Don't use __weak in header files 2015-03-25 08:57:23 -04:00