ANDROID: fix out-of-bounds error when trace_create_new_event
The global_trace of trace_array is not created with the trace_array_ext extensions. Add trace_array_get_system_names() function to prevent access global_trace's system_names. BUG: KASAN: global-out-of-bounds in trace_create_new_event+0x80/0x35c Read of size 8 at addr ffffffc081214898 by task insmod/48 Call trace: dump_backtrace+0x94/0xec show_stack+0x18/0x24 dump_stack_lvl+0x60/0xac print_report+0x1ec/0x5ac kasan_report+0xc8/0x110 __asan_load8+0x9c/0xb8 trace_create_new_event+0x80/0x35c __trace_add_new_event+0x20/0xd8 Bug: 418940629 Bug: 423127606 Bug: 428632261 Fixes: 6af2e78f ("ANDROID: fix ABI breakage for trace_array extensions") Change-Id: Iacf60548d3a08081865761e0fa61da9f87e5c39c Signed-off-by:Richard Chang <richardycc@google.com> (cherry picked from commit 4ec55296)
Loading
Please sign in to comment