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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191114191335.GA24290@kernel.org>
Date:   Thu, 14 Nov 2019 16:13:35 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Adrian Hunter <adrian.hunter@...el.com>
Cc:     Jiri Olsa <jolsa@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf callchain: Fix segfault in
 thread__resolve_callchain_sample()

Em Thu, Nov 14, 2019 at 04:25:38PM +0200, Adrian Hunter escreveu:
> Do not dereference 'chain' when it is NULL.
> 
>   $ perf record -e intel_pt//u -e branch-misses:u uname
>   $ perf report --itrace=l --branch-history
>   perf: Segmentation fault

Thanks, tested and applied.

- Arnaldo
 
> Fixes: e9024d519d89 ("perf callchain: Honour the ordering of PERF_CONTEXT_{USER,KERNEL,etc}")
> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
> ---
>  tools/perf/util/machine.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> index 6a0f5c25ce3e..0a21ab69a247 100644
> --- a/tools/perf/util/machine.c
> +++ b/tools/perf/util/machine.c
> @@ -2414,7 +2414,7 @@ static int thread__resolve_callchain_sample(struct thread *thread,
>  	}
>  
>  check_calls:
> -	if (callchain_param.order != ORDER_CALLEE) {
> +	if (chain && callchain_param.order != ORDER_CALLEE) {
>  		err = find_prev_cpumode(chain, thread, cursor, parent, root_al,
>  					&cpumode, chain->nr - first_call);
>  		if (err)
> -- 
> 2.17.1

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ