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]
Date:	Fri, 18 Sep 2015 11:26:22 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	平松雅巳 / HIRAMATU,MASAMI 
	<masami.hiramatsu.pt@...achi.com>
Cc:	Namhyung Kim <namhyung@...nel.org>,
	"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Milian Wolff <milian.wolff@...b.com>
Subject: Re: [PATCH perf/core ] [BUGFIX] perf probe: Fix a segfault when
 removing uprobe events

Em Fri, Sep 18, 2015 at 01:39:13AM +0000, 平松雅巳 / HIRAMATU,MASAMI escreveu:
> Hi Arnaldo,
> 
> Could you pull this bugfix as an urgent patch, since this fixes a critical
> problem?

Sure, thanks for the reminder.

- Arnaldo
 
> Thanks,
> 
> From: Masami Hiramatsu [mailto:masami.hiramatsu.pt@...achi.com]
> >
> >Fix a segfault bug and a small mistake in perf probe -d.
> >
> >Since the "ulist" in perf_del_probe_events is never initialized,
> >strlist__add(ulist, *) always causes a segfault when removing
> >uprobe events by perf probe -d.
> >
> >Also, the "str" local variable is never released if fail to
> >allocate the "klist". This fixes it too.
> >
> >This has been introduced by the commit e607f1426b58 ("perf probe:
> >Print deleted events in cmd_probe()").
> >
> >Reported-by: Milian Wolff <milian.wolff@...b.com>
> >Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
> >---
> > tools/perf/builtin-probe.c |    7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> >diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
> >index 94385ee..f7882ae 100644
> >--- a/tools/perf/builtin-probe.c
> >+++ b/tools/perf/builtin-probe.c
> >@@ -380,8 +380,11 @@ static int perf_del_probe_events(struct strfilter *filter)
> > 		goto out;
> >
> > 	klist = strlist__new(NULL, NULL);
> >-	if (!klist)
> >-		return -ENOMEM;
> >+	ulist = strlist__new(NULL, NULL);
> >+	if (!klist || !ulist) {
> >+		ret = -ENOMEM;
> >+		goto out;
> >+	}
> >
> > 	ret = probe_file__get_events(kfd, filter, klist);
> > 	if (ret == 0) {
> >
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ