Commit 4ec55296 authored by Richard Chang's avatar Richard Chang
Browse files

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
Fixes: 6af2e78f ("ANDROID: fix ABI breakage for trace_array extensions")
Change-Id: Iacf60548d3a08081865761e0fa61da9f87e5c39c
Signed-off-by: default avatarRichard Chang <richardycc@google.com>
parent d9ec0e18
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment