Steven Rostedt (Red Hat)
6b88f44e16
tracing/filter: Do not allow infix to exceed end of string
...
While debugging a WARN_ON() for filtering, I found that it is possible
for the filter string to be referenced after its end. With the filter:
# echo '>' > /sys/kernel/debug/events/ext4/ext4_truncate_exit/filter
The filter_parse() function can call infix_get_op() which calls
infix_advance() that updates the infix filter pointers for the cnt
and tail without checking if the filter is already at the end, which
will put the cnt to zero and the tail beyond the end. The loop then calls
infix_next() that has
ps->infix.cnt--;
return ps->infix.string[ps->infix.tail++];
The cnt will now be below zero, and the tail that is returned is
already passed the end of the filter string. So far the allocation
of the filter string usually has some buffer that is zeroed out, but
if the filter string is of the exact size of the allocated buffer
there's no guarantee that the charater after the nul terminating
character will be zero.
Luckily, only root can write to the filter.
Cc: stable@vger.kernel.org # 2.6.33+
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-06-25 18:18:17 -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
bpf_trace.c
tracing: Allow BPF programs to call bpf_trace_printk()
2015-04-02 13:25:50 +02:00
ftrace.c
Some clean ups and small fixes, but the biggest change is the addition
2015-04-14 10:49:03 -07:00
Kconfig
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2015-04-14 14:37:47 -07:00
Makefile
bpf: Fix the build on BPF_SYSCALL=y && !CONFIG_TRACING kernels, make it more configurable
2015-04-02 16:28:06 +02: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
ring-buffer-benchmark: Fix the wrong sched_priority of producer
2015-06-11 09:27:58 -04:00
rpm-traces.c
trace.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2015-04-26 17:22:07 -07:00
trace.h
Some clean ups and small fixes, but the biggest change is the addition
2015-04-14 10:49:03 -07:00
trace_benchmark.c
trace_benchmark.h
trace_branch.c
tracing: Remove unneeded includes of debugfs.h and fs.h
2015-01-22 11:19:48 -05:00
trace_clock.c
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
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2015-04-26 17:22:07 -07:00
trace_events_filter.c
tracing/filter: Do not allow infix to exceed end of string
2015-06-25 18:18:17 -04:00
trace_events_filter_test.h
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
This adds three fixes for the tracing code.
2015-04-22 11:27:36 -07: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
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
2015-04-14 14:37:47 -07: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: Make ftrace_print_array_seq compute buf_len
2015-05-06 23:03:23 -04: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
Some clean ups and small fixes, but the biggest change is the addition
2015-04-14 10:49:03 -07: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
trace_selftest_dynamic.c
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: remove use of seq_printf return value
2015-04-15 16:35:25 -07:00
trace_stat.c
tracing: Convert the tracing facility over to use tracefs
2015-02-03 12:48:41 -05:00
trace_stat.h
trace_syscalls.c
perf: Avoid horrible stack usage
2015-01-14 15:11:45 +01:00
trace_uprobe.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2015-04-26 17:22:07 -07:00