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: <4F761FB9.4070107@gmail.com>
Date:	Fri, 30 Mar 2012 15:03:53 -0600
From:	David Ahern <dsahern@...il.com>
To:	Andi Kleen <andi@...stfloor.org>
CC:	acme@...hat.com, linux-kernel@...r.kernel.org,
	Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 2/2] perf tools: Fix record sample overlap check for callchains

On 3/30/12 11:38 AM, Andi Kleen wrote:
> From: Andi Kleen<ak@...ux.intel.com>
>
> perf record checks for buffer overflow, but checked for the wrong
> size for callchains.  callchains are 8 bytes each, not 1.
>
> Signed-off-by: Andi Kleen<ak@...ux.intel.com>
> ---
>   tools/perf/util/evsel.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index f421f7c..90c0756 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -550,7 +550,7 @@ int perf_event__parse_sample(const union perf_event *event, u64 type,
>
>   		data->callchain = (struct ip_callchain *)array;
>
> -		if (sample_overlap(event, array, data->callchain->nr))
> +		if (sample_overlap(event, array, (1 + data->callchain->nr) * 8))

sizeof(u64) rather than the magic 8?

David

>   			return -EFAULT;
>
>   		array += 1 + data->callchain->nr;

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