diff options
author | Ian Rogers <irogers@google.com> | 2020-03-06 23:31:21 -0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-03-09 10:29:45 -0300 |
commit | 05e54e2386733dfdb62b6784b3d6e1b0bd9bb559 (patch) | |
tree | 0d2580f06045131bc86c5098b1933c9d85be2662 /tools/perf/util/probe-file.c | |
parent | a7ffd416d80497f03d1f62c0b330cff76a86d5ad (diff) | |
download | linux-stable-05e54e2386733dfdb62b6784b3d6e1b0bd9bb559.tar.gz linux-stable-05e54e2386733dfdb62b6784b3d6e1b0bd9bb559.tar.bz2 linux-stable-05e54e2386733dfdb62b6784b3d6e1b0bd9bb559.zip |
perf parse-events: Fix reading of invalid memory in event parsing
ADD_CONFIG_TERM accesses term->weak, however, in get_config_chgs this
value is accessed outside of the list_for_each_entry and references
invalid memory. Add an argument for ADD_CONFIG_TERM for weak and set it
to false in the get_config_chgs case.
This bug was cause by clang's address sanitizer and libfuzzer. It can be
reproduced with a command line of:
perf stat -a -e i/bs,tsc,L2/o
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: clang-built-linux@googlegroups.com
Link: http://lore.kernel.org/lkml/20200307073121.203816-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-file.c')
0 files changed, 0 insertions, 0 deletions