user_events: Validate user payloads for size and null termination
authorBeau Belgrave <beaub@linux.microsoft.com>
Tue, 18 Jan 2022 20:43:20 +0000 (12:43 -0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 11 Feb 2022 03:37:38 +0000 (22:37 -0500)
commit2467cda1b5c97a58776a8aebfa5d76543e47479d
tree99e2136f6c838905c3e5e3569850a2a2c694a4e1
parent0279400ad38d858ed68f5d787385f6122d4170b2
user_events: Validate user payloads for size and null termination

Add validation to ensure data is at or greater than the min size for the
fields of the event. If a dynamic array is used and is a type of char,
ensure null termination of the array exists.

Link: https://lkml.kernel.org/r/20220118204326.2169-7-beaub@linux.microsoft.com
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events_user.c