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] [day] [month] [year] [list]
Message-ID: <172080273250.2773604.16649814239914187586.b4-ty@kernel.org>
Date: Fri, 12 Jul 2024 09:45:51 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: irogers@...gle.com,
	Haoze Xie <royenheart@...il.com>
Cc: peterz@...radead.org,
	mingo@...hat.com,
	acme@...nel.org,
	mark.rutland@....com,
	alexander.shishkin@...ux.intel.com,
	jolsa@...nel.org,
	adrian.hunter@...el.com,
	kan.liang@...ux.intel.com,
	linux-perf-users@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Yuan Tan <tanyuan@...ylab.org>
Subject: Re: [PATCH 1/1] perf record: Fix memset out-of-range error

On Mon, 08 Jul 2024 02:01:00 +0800, Haoze Xie wrote:

> Modified the object of 'memset' from '&lost.lost' to '&lost' in
> record__read_lost_samples. This allows 'memset' to access memory properly
> without causing out-of-bounds problems.
> 
> The problems got from builtin-record.c are:
> 
> In file included from /usr/include/string.h:495,
>                  from util/parse-events.h:13,
>                  from builtin-record.c:14:
> In function 'memset',
>     inlined from 'record__read_lost_samples' at
>     builtin-record.c:1958:6,
>     inlined from '__cmd_record.constprop' at builtin-record.c:2817:2:
> /usr/include/x86_64-linux-gnu/bits/string_fortified.h:71:10: error:
> '__builtin_memset' offset [17, 64] from the object at 'lost' is out
> of the bounds of referenced subobject 'lost' with type
> 'struct perf_record_lost_samples' at offset 0 [-Werror=array-bounds]
> 71|return __builtin___memset_chk (__dest,__ch,__len,__bos0 (__dest));
>   |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> [...]

Applied to perf-tools-next, thanks!

Best regards,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ