Skip to content
Commit 96f71f66 authored by Yang Jihong's avatar Yang Jihong Committed by Greg Kroah-Hartman
Browse files

perf symbols: Fix return incorrect build_id size in elf_read_build_id()

[ Upstream commit 1511e469 ]

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: be96ea8f

 ("perf symbols: Fix issue with binaries using 16-bytes buildids (v2)")
Reported-by: default avatarWill Ochowicz <Will.Ochowicz@genusplc.com>
Signed-off-by: default avatarYang Jihong <yangjihong1@huawei.com>
Tested-by: default avatarWill Ochowicz <Will.Ochowicz@genusplc.com>
Acked-by: default avatarAdrian 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/CWLP...
parent 78190a6e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment