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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z37jBKAdWNmWMPi6@x1>
Date: Wed, 8 Jan 2025 17:41:40 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: James Clark <james.clark@...aro.org>
Cc: Ian Rogers <irogers@...gle.com>, Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Kan Liang <kan.liang@...ux.intel.com>, Leo Yan <leo.yan@....com>,
	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] perf test cpumap: Avoid use-after-free following merge

On Wed, Jan 08, 2025 at 03:07:53PM +0000, James Clark wrote:
> 
> 
> On 08/01/2025 5:15 am, Ian Rogers wrote:
> > Previously cpu maps in the test weren't modified by calls to the cpu
> > map API, however, perf_cpu_map__merge was modified so the left hand
> > argument was updated. In the test this meant the maps copy of the
> > "two" map was put/deleted in the merge meaning when accessed via maps,
> > the pointer was stale and to the put/deleted memory. To fix this add
> > an extra layer of indirection to the maps array, so the updated value
> > of two is accessed.
> > 
> > Fixes: a9d2217556f7 ("libperf cpumap: Refactor perf_cpu_map__merge()")
> > Signed-off-by: Ian Rogers <irogers@...gle.com>
> 
> Reviewed-by: James Clark <james.clark@...aro.org>

Thanks, applied to perf-tools-next,

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ