tracing/user_events: Ensure user provided strings are safely formatted
authorBeau Belgrave <beaub@linux.microsoft.com>
Thu, 28 Jul 2022 23:33:06 +0000 (16:33 -0700)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 29 Sep 2022 14:17:36 +0000 (10:17 -0400)
commite6f89a149872ab0e03cfded97983df74dfb0ef21
tree4aae8953e88079c2cdf959572736b073c1e1ff0f
parent95f187603dbff69bef19b2ab3bb54d2c060f556d
tracing/user_events: Ensure user provided strings are safely formatted

User processes can provide bad strings that may cause issues or leak
kernel details back out. Don't trust the content of these strings
when formatting strings for matching.

This also moves to a consistent dynamic length string creation model.

Link: https://lkml.kernel.org/r/20220728233309.1896-4-beaub@linux.microsoft.com
Link: https://lore.kernel.org/all/2059213643.196683.1648499088753.JavaMail.zimbra@efficios.com/
Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events_user.c