lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Zv7vxSu9gAhuA0ws@aschofie-mobl2.lan>
Date: Thu, 3 Oct 2024 12:25:57 -0700
From: Alison Schofield <alison.schofield@...el.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
	Linux Trace Kernel <linux-trace-kernel@...r.kernel.org>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [PATCH] tracing: Fix trace_check_vprintf() when tp_printk is used

On Thu, Oct 03, 2024 at 10:49:25AM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@...dmis.org>
> 
> When the tp_printk kernel command line is used, the trace events go
> directly to printk(). It is still checked via the trace_check_vprintf()
> function to make sure the pointers of the trace event are legit.
> 
> The addition of reading buffers from previous boots required adding a
> delta between the addresses of the previous boot and the current boot so
> that the pointers in the old buffer can still be used. But this required
> adding a trace_array pointer to acquire the delta offsets.
> 
> The tp_printk code does not provide a trace_array (tr) pointer, so when
> the offsets were examined, a NULL pointer dereference happened and the
> kernel crashed.
> 
> If the trace_array does not exist, just default the delta offsets to zero,
> as that also means the trace event is not being read from a previous boot.
> 
> Link: https://lore.kernel.org/all/Zv3z5UsG_jsO9_Tb@aschofie-mobl2.lan/
> 

Thanks Steve!

Tested-by: Alison Schofield <alison.schofield@...el.com>


> Reported-by: Alison Schofield <alison.schofield@...el.com>
> Fixes: 07714b4bb3f98 ("tracing: Handle old buffer mappings for event strings and functions")
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> ---
>  kernel/trace/trace.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
>
snip

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ