Files
linux/tools/perf/util
Arnaldo Carvalho de Melo 96fcc9ea5f perf auxtrace: Fix queue grow overflow and old array leak
auxtrace_queues__grow() has two bugs:

1. When idx is UINT_MAX, the caller passes new_nr_queues = idx + 1 = 0.
   The function skips growing (since any nr_queues >= 0), returns
   success, and the caller accesses queue_array[UINT_MAX] — an OOB
   heap write.  Fix by rejecting new_nr_queues == 0 up front.

2. The function allocates a new queue_array via calloc and copies
   elements from the old array, but never frees the old array.  Fix
   by saving the old pointer and freeing it after the copy.

Fixes: e502789302 ("perf auxtrace: Add helpers for queuing AUX area tracing data")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2026-08-03 12:42:53 -07:00
..
2026-06-15 14:33:49 -03:00
2026-01-13 17:03:25 -03:00
2026-01-13 17:03:25 -03:00
2026-03-13 14:13:02 -07:00
2026-04-02 19:35:16 -07:00
2023-03-14 08:29:46 -03:00
2026-06-30 10:17:10 -07:00
2026-06-30 10:17:10 -07:00
2021-08-11 09:35:44 -03:00
2024-08-19 14:52:13 -03:00
2023-01-23 10:00:47 -03:00
2026-06-30 10:17:10 -07:00
2024-08-19 14:51:46 -03:00
2026-06-15 09:01:27 -03:00
2026-06-15 09:01:27 -03:00
2025-05-02 15:36:14 -03:00
2025-02-10 11:46:02 -08:00
2026-06-30 10:17:11 -07:00
2023-04-06 21:40:28 -03:00
2023-09-12 17:47:00 -03:00
2026-06-30 10:17:11 -07:00
2025-03-10 11:31:24 -07:00
2025-03-10 11:31:24 -07:00
2025-12-17 09:30:37 -03:00
2026-03-26 15:22:18 -07:00
2025-07-11 12:36:40 -07:00
2025-07-11 12:36:40 -07:00
2024-12-12 15:53:36 -03:00
2025-06-09 11:18:18 -07:00
2025-07-26 16:31:43 -07:00
2025-09-19 12:14:29 -03:00
2023-04-10 19:20:53 -03:00
2024-09-27 15:38:52 -03:00