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: <Yj4JqAimNd1INLjB@kernel.org>
Date:   Fri, 25 Mar 2022 15:27:52 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Stephane Eranian <eranian@...gle.com>
Cc:     linux-kernel@...r.kernel.org, peterz@...radead.org,
        kim.phillips@....com, acme@...hat.com, jolsa@...hat.com,
        songliubraving@...com, rafael@...nel.org, ravi.bangoria@....com,
        sandipan.das@....com
Subject: Re: [PATCH v7 10/13] perf tools: fix NULL point in evsel__env()

Em Tue, Mar 22, 2022 at 03:15:14PM -0700, Stephane Eranian escreveu:
> evsel_env() cannot return NULL. In case evsel->evlist->env is NULL default
> to perf_env. Fixes crashes in evsel__open_strerror()
> 
> Signed-off-by: Ravi Bangoria <ravi.bangoria@....com>
> Reviewed-by: Stephane Eranian <eranian@...gle.com>

I have this already in from a patch by Kim Phillips.

- Arnaldo

> ---
>  tools/perf/util/evsel.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index 22d3267ce294..14b0e7ffa2c7 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -2965,7 +2965,7 @@ int evsel__open_strerror(struct evsel *evsel, struct target *target,
>  
>  struct perf_env *evsel__env(struct evsel *evsel)
>  {
> -	if (evsel && evsel->evlist)
> +	if (evsel && evsel->evlist && evsel->evlist->env)
>  		return evsel->evlist->env;
>  	return &perf_env;
>  }
> -- 
> 2.35.1.894.gb6a874cedc-goog

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ