diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-05-23 08:06:35 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-05-29 11:44:11 -0300 |
| commit | 1e389b7639f17e947ab9ed77bcba9f2ab7420f74 (patch) | |
| tree | 97a338462b16194dc9f369d1019213ceadc69317 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | da27c4379ce6b2b7d5d3359e9b10c829b9e5dbbe (diff) | |
perf session: Bounds-check one_mmap event pointer in peek_event
perf_session__peek_event() computes an event pointer directly from
file_offset when one_mmap is active, without verifying that file_offset
and the subsequent event->header.size fall within the mapped region.
A corrupted perf.data file could cause out-of-bounds memory reads.
Add one_mmap_size to the session struct and validate both the header
and full event fit within the mmap before dereferencing.
Reported-by: sashiko-bot@kernel.org # Running on a local machine
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Assisted-by: Claude:claude-opus-4.6-1m
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
