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: <20141015191725.GQ3198@kernel.org>
Date:	Wed, 15 Oct 2014 16:17:25 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Yasser Shalabi <yassershalabi@...il.com>,
	linux-kernel@...r.kernel.org, mingo@...hat.com, paulus@...ba.org,
	a.p.zijlstra@...llo.nl
Subject: Re: [PATCH] perf: fix for double free in tools/perf stat

Em Tue, Oct 07, 2014 at 05:15:41PM +0900, Namhyung Kim escreveu:
> Hi Yasser,
> 
> On Sat,  4 Oct 2014 11:37:57 -0400, Yasser Shalabi wrote:
> > Fix for double free bug in tools/perf due to dangling thread_map pointer in perf_evlist struct.
> > Code path excercised when perf stat -C switch is used but not set and is followed by another switch.
> > Example: perf stat -C -e. 
> > Signed-off-by: Yasser Shalabi <yassershalabi@...il.com>
> >
> > ---
> >  tools/perf/util/evlist.c |    1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
> > index 814e954..09af633 100644
> > --- a/tools/perf/util/evlist.c
> > +++ b/tools/perf/util/evlist.c
> > @@ -845,6 +845,7 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
> >  
> >  out_delete_threads:
> >  	thread_map__delete(evlist->threads);
> > +	evlist->threads = 0;
> 
> Nitpick - I think NULL is preferred rather than 0.

yeah, I fixed that.
 
> Other than that,
> 
> Acked-by: Namhyung Kim <namhyung@...nel.org>

Thanks, applied!
 
> Thanks,
> Namhyung
> 
> 
> >  	return -1;
> >  }
--
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