Re: [PATCH] tracing: Add size check when printing trace_marker output

2023-12-12 Thread Steven Rostedt
On Tue, 12 Dec 2023 08:44:44 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > If for some reason the trace_marker write does not have a nul byte for the > string, it will overflow the print: > > trace_seq_printf(s, ": %s", field->buf); > > The field->buf could be missing

Re: [PATCH] tracing: Add size check when printing trace_marker output

2023-12-12 Thread Google
On Tue, 12 Dec 2023 08:44:44 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > If for some reason the trace_marker write does not have a nul byte for the > string, it will overflow the print: > > trace_seq_printf(s, ": %s", field->buf); > > The field->buf could be missing

Re: [PATCH] tracing: Add size check when printing trace_marker output

2023-12-12 Thread Steven Rostedt
On Tue, 12 Dec 2023 09:23:54 -0500 Mathieu Desnoyers wrote: > On 2023-12-12 08:44, Steven Rostedt wrote: > > From: "Steven Rostedt (Google)" > > > > If for some reason the trace_marker write does not have a nul byte for the > > string, it will overflow the print: > > Does this result in

Re: [PATCH] tracing: Add size check when printing trace_marker output

2023-12-12 Thread Mathieu Desnoyers
On 2023-12-12 08:44, Steven Rostedt wrote: From: "Steven Rostedt (Google)" If for some reason the trace_marker write does not have a nul byte for the string, it will overflow the print: Does this result in leaking kernel memory to userspace ? If so, it should state "Fixes..." and CC stable.

[PATCH] tracing: Add size check when printing trace_marker output

2023-12-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" If for some reason the trace_marker write does not have a nul byte for the string, it will overflow the print: trace_seq_printf(s, ": %s", field->buf); The field->buf could be missing the nul byte. To prevent overflow, add the max size that the buf can be by