]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3d675f16a01ba0e543126033887eb7a5af96f05e
tree99e2136f6c838905c3e5e3569850a2a2c694a4e1
parent63c6beefafc9928c2688c887ac298633a4092bbb
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