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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190614163136.25115131@gandalf.local.home>
Date:   Fri, 14 Jun 2019 16:31:36 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Eiichi Tsukata <devel@...ukata.com>
Cc:     mingo@...hat.com, linux-kernel@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] tracing: Fix out-of-range read in trace_stack_print()

On Mon, 10 Jun 2019 13:00:16 +0900
Eiichi Tsukata <devel@...ukata.com> wrote:

> Puts range check before dereferencing the pointer.
> 
> Reproducer:
> 
>   # echo stacktrace > trace_options
>   # echo 1 > events/enable
>   # cat trace > /dev/null
> 
>

Thanks I applied this.

> 
> Fixes: 4a9bd3f134dec ("tracing: Have dynamic size event stack traces")

Actually it fixes:

 4285f2fcef80 ("tracing: Remove the ULONG_MAX stack trace hackery")

Because before that, a ULONG_MAX was inserted into the buffer.

-- Steve

> Signed-off-by: Eiichi Tsukata <devel@...ukata.com>
> ---
>  kernel/trace/trace_output.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
> index 54373d93e251..ba751f993c3b 100644
> --- a/kernel/trace/trace_output.c
> +++ b/kernel/trace/trace_output.c
> @@ -1057,7 +1057,7 @@ static enum print_line_t trace_stack_print(struct trace_iterator *iter,
>  
>  	trace_seq_puts(s, "<stack trace>\n");
>  
> -	for (p = field->caller; p && *p != ULONG_MAX && p < end; p++) {
> +	for (p = field->caller; p && p < end && *p != ULONG_MAX; p++) {
>  
>  		if (trace_seq_has_overflowed(s))
>  			break;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ