linux-stable/tools/perf
Yang Jihong 96f71f669b perf symbols: Fix return incorrect build_id size in elf_read_build_id()
[ Upstream commit 1511e4696a ]

In elf_read_build_id(), if gnu build_id is found, should return the size of
the actually copied data. If descsz is greater thanBuild_ID_SIZE,
write_buildid data access may occur.

Fixes: be96ea8ffa ("perf symbols: Fix issue with binaries using 16-bytes buildids (v2)")
Reported-by: Will Ochowicz <Will.Ochowicz@genusplc.com>
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
Tested-by: Will Ochowicz <Will.Ochowicz@genusplc.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
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>
Link: https://lore.kernel.org/lkml/CWLP265MB49702F7BA3D6D8F13E4B1A719C649@CWLP265MB4970.GBRP265.PROD.OUTLOOK.COM/T/
Link: https://lore.kernel.org/r/20230427012841.231729-1-yangjihong1@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-17 11:36:00 +02:00
..
Documentation perf record/stat: Explicitly call out event modifiers in the documentation 2020-09-05 11:22:49 +02:00
arch perf tools: Fix record failure when mixed with ARM SPE event 2020-08-05 09:59:49 +02:00
bench parisc: Align parisc MADV_XXX constants with all other architectures 2023-01-18 11:42:00 +01:00
examples/bpf
include/bpf
jvmti
lib
pmu-events perf vendor events power9: Remove UTF-8 characters from JSON files 2023-05-17 11:36:00 +02:00
python tweewide: Fix most Shebang lines 2021-05-22 11:38:30 +02:00
scripts perf scripts python: exported-sql-viewer.py: Fix warning display 2021-06-03 08:59:00 +02:00
tests perf tests: Remove bash construct from record+zstd_comp_decomp.sh 2021-11-26 10:47:18 +01:00
trace perf trace: Add the syscall_arg_fmt pointer to syscall_arg 2023-01-18 11:41:28 +01:00
ui perf hist: Fix memory leak of a perf_hpp_fmt 2021-12-08 09:01:10 +01:00
util perf symbols: Fix return incorrect build_id size in elf_read_build_id() 2023-05-17 11:36:00 +02:00
.gitignore
Build
CREDITS
MANIFEST
Makefile tools: Let O= makes handle a relative path with -C option 2020-04-01 11:02:00 +02:00
Makefile.config tools build: Filter out options and warnings not supported by clang 2022-04-15 14:18:40 +02:00
Makefile.perf tools: Factor HOSTCC, HOSTLD, HOSTAR definitions 2021-01-30 13:54:10 +01:00
builtin-annotate.c
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-c2c.c perf c2c: Fix sorting in percent_rmt_hitm_cmp() 2022-06-14 18:11:56 +02:00
builtin-config.c
builtin-data.c
builtin-diff.c perf diff: Use llabs() with 64-bit values 2020-01-04 19:18:26 +01:00
builtin-evlist.c
builtin-ftrace.c perf ftrace: Fix access to pid in array when setting a pid filter 2021-05-07 10:51:37 +02:00
builtin-help.c
builtin-inject.c perf inject: Close inject.output on exit 2021-07-28 13:31:02 +02:00
builtin-kallsyms.c
builtin-kmem.c
builtin-kvm.c
builtin-list.c
builtin-lock.c perf lock: Don't free "lock_seq_stat" if read_count isn't zero 2020-11-24 13:29:05 +01:00
builtin-mem.c
builtin-probe.c perf probe: Do not show the skipped events 2020-06-22 09:31:27 +02:00
builtin-record.c perf record: Correct the help info of option "--no-bpf-event" 2020-09-09 19:12:36 +02:00
builtin-report.c perf report: Fix memory leaks around perf_tip() 2021-12-08 09:01:10 +01:00
builtin-sched.c perf sched: Cast PTHREAD_STACK_MIN to int as it may turn into sysconf(__SC_THREAD_STACK_MIN_VALUE) 2023-05-17 11:35:32 +02:00
builtin-script.c perf script: Fix CPU filtering of a script's switch events 2022-01-05 12:37:46 +01:00
builtin-stat.c perf stat: Skip duration_time in setup_system_wide 2020-10-29 09:57:50 +01:00
builtin-timechart.c
builtin-top.c perf top: Fix stdio interface input handling with glibc 2.28+ 2020-10-14 10:32:59 +02:00
builtin-trace.c perf trace: Handle failure when trace point folder is missed 2023-01-18 11:41:28 +01:00
builtin-version.c
builtin.h
check-headers.sh x86: xen: insn: Decode Xen and KVM emulate-prefix signature 2022-05-15 19:54:47 +02:00
command-list.txt
design.txt
perf-archive.sh
perf-completion.sh perf tools: Fix auto-complete on aarch64 2023-03-11 16:43:49 +01:00
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh
perf.c perf tools: Fix perf's libperf_print callback 2022-04-15 14:18:38 +02:00
perf.h