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-next>] [day] [month] [year] [list]
Message-ID: <b660a320-6b32-cc24-d829-1527dfc16e5d@embeddedor.com>
Date:   Tue, 27 Aug 2019 11:12:04 -0500
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org
Cc:     Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>, Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>
Subject: Re: [tip: perf/core] perf script: Fix memory leaks in list_scripts()

Hi,

On 8/27/19 3:26 AM, tip-bot2 for Gustavo A. R. Silva wrote:
> The following commit has been merged into the perf/core branch of tip:
> 
> Commit-ID:     3b4acbb92dbda4829e021e5c6d5410658849fa1c
> Gitweb:        https://git.kernel.org/tip/3b4acbb92dbda4829e021e5c6d5410658849fa1c
> Author:        Gustavo A. R. Silva <gustavo@...eddedor.com>
> AuthorDate:    Mon, 08 Apr 2019 11:27:48 -05:00
> Committer:     Arnaldo Carvalho de Melo <acme@...hat.com>
> CommitterDate: Mon, 26 Aug 2019 11:58:30 -03:00
> 
> perf script: Fix memory leaks in list_scripts()
> 
> In case memory resources for *buf* and *paths* were allocated, jump to
> *out* and release them before return.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>

This should be tagged for stable:

Cc: stable@...r.kernel.org

> Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
> Cc: Andi Kleen <ak@...ux.intel.com>
> Cc: Gustavo A. R. Silva <gustavo@...eddedor.com>
> Cc: Jiri Olsa <jolsa@...hat.com>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Addresses-Coverity-ID: 1444328 ("Resource leak")
> Fixes: 6f3da20e151f ("perf report: Support builtin perf script in scripts menu")
> Link: http://lkml.kernel.org/r/20190408162748.GA21008@embeddedor
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> ---
>  tools/perf/ui/browsers/scripts.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/ui/browsers/scripts.c b/tools/perf/ui/browsers/scripts.c
> index f2fd9f0..50e0c03 100644
> --- a/tools/perf/ui/browsers/scripts.c
> +++ b/tools/perf/ui/browsers/scripts.c
> @@ -133,8 +133,10 @@ static int list_scripts(char *script_name, bool *custom,
>  		int key = ui_browser__input_window("perf script command",
>  				"Enter perf script command line (without perf script prefix)",
>  				script_args, "", 0);
> -		if (key != K_ENTER)
> -			return -1;
> +		if (key != K_ENTER) {
> +			ret = -1;
> +			goto out;
> +		}
>  		sprintf(script_name, "%s script %s", perf, script_args);
>  	} else if (choice < num + max_std) {
>  		strcpy(script_name, paths[choice]);
> 

--
Gustavo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ