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:	Wed, 9 Mar 2011 10:59:25 -0300
From:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	a.p.zijlstra@...llo.nl, paulus@...ba.org, mingo@...e.hu,
	linux-kernel@...r.kernel.org, phan@...hat.com
Subject: Re: [PATCH 1/2] perf,top: fix events overflow in top command

Em Mon, Mar 07, 2011 at 09:13:40PM +0100, Jiri Olsa escreveu:
> The snprintf function returns number of printed characters even
> if it cross the size parameter. So passing enough events via '-e'
> parameter will cause segmentation fault.
> 
> It's reproduced by following command:
> 
> perf top -e `perf list | grep Tracepoint | awk -F'[' '\
> {gsub(/[[:space:]]+/,"",$1);array[FNR]=$1}END{outputs=array[1];\
> for (i=2;i<=FNR;i++){ outputs=outputs "," array[i];};print outputs}'`
> 
> Attached patch is adding SNPRINTF macro that provides the
> overflow check and returns actuall number of printed characters.

Good catch, applying to perf/urgent.

- Arnaldo
--
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