diff options
| author | Ian Rogers <irogers@google.com> | 2026-07-16 00:23:42 -0700 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2026-07-17 22:34:05 -0700 |
| commit | 2ec3b985872594031cc1000b830344de5c26633d (patch) | |
| tree | 6f175eb5a0dbb1c2a4d75ea7acc33ac79d88797f /tools/perf/scripts/python/task-analyzer.py | |
| parent | 59355235f29e02eb4d88aa2d0c0d68aca901c929 (diff) | |
perf hists browser: Increase MAX_OPTIONS to prevent stack buffer overflow
In evsel__hists_browse(), the 'options' and 'actions' arrays are
statically allocated on the stack with a size of MAX_OPTIONS (16).
Further down, the function sequentially calls several add_*_opt()
functions, which increment nr_options without bounds checking.
Depending on the context (e.g., branch mode, scripting, annotations),
the sum of added options can theoretically exceed 16 (potentially
reaching up to ~19). This could lead to a stack buffer overflow.
Increase MAX_OPTIONS to 32 to safely accommodate the maximum possible
number of options without risking an overflow.
Closes: https://lore.kernel.org/linux-perf-users/20260708235834.3FB771F00A3A@smtp.kernel.org/
Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/linux-perf-users/20260708235834.3FB771F00A3A@smtp.kernel.org/
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
