tracing: Fix allocation of printing set_event file content
Steven Rostedt
maintainerPATCH 1/1 tracing: Fix allocation of printing set_event file content
From: Steven Rostedt <[email protected]>
The adding of cached events for modules not loaded yet required a descriptor to separate the iteration of events with the iteration of cached events for a module. But the allocation used the size of the pointer and not the size of the contents to allocate its data and caused a slab-out-of-bounds.
Reported-by Sasha Levin <[email protected]>
Fixes b355247df104e ("tracing: Cache ":mod:" events for modules not loaded yet")
Signed-off-by Steven Rostedt (Google) <[email protected]>
--- kernel/trace/trace_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/trace_events.c +1 -1
@@ -1588,7 +1588,7 @@ static void *s_start(struct seq_file *m, loff_t *pos)struct set_event_iter *iter;loff_t l; - iter =kzalloc (sizeof (iter),GFP_KERNEL ); + iter =kzalloc (sizeof (*iter),GFP_KERNEL );if (!iter)return NULL ;
Signature · 1 line
2.45.2