Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'trace-v5.11-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fix from Steven Rostedt:
"Fix buffer overflow in trace event filter.

It was reported that if an trace event was larger than a page and was
filtered, that it caused memory corruption. The reason is that
filtered events first go into a buffer to test the filter before being
written into the ring buffer. Unfortunately, this write did not check
the size"

* tag 'trace-v5.11-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing: Check length before giving out the filter buffer

+1 -1
+1 -1
kernel/trace/trace.c
··· 2745 2745 (entry = this_cpu_read(trace_buffered_event))) { 2746 2746 /* Try to use the per cpu buffer first */ 2747 2747 val = this_cpu_inc_return(trace_buffered_event_cnt); 2748 - if (val == 1) { 2748 + if ((len < (PAGE_SIZE - sizeof(*entry))) && val == 1) { 2749 2749 trace_event_setup(entry, type, flags, pc); 2750 2750 entry->array[0] = len; 2751 2751 return entry;