android_kernel_samsung_a7y1.../tools/perf/util
disconnect3d a9c51ea1dd perf map: Fix off by one in strncpy() size argument
commit db2c549407d4a76563c579e4768f7d6d32afefba upstream.

This patch fixes an off-by-one error in strncpy size argument in
tools/perf/util/map.c. The issue is that in:

        strncmp(filename, "/system/lib/", 11)

the passed string literal: "/system/lib/" has 12 bytes (without the NULL
byte) and the passed size argument is 11. As a result, the logic won't
match the ending "/" byte and will pass filepaths that are stored in
other directories e.g. "/system/libmalicious/bin" or just
"/system/libmalicious".

This functionality seems to be present only on Android. I assume the
/system/ directory is only writable by the root user, so I don't think
this bug has much (or any) security impact.

Fixes: eca818369996 ("perf tools: Add automatic remapping of Android libraries")
Signed-off-by: disconnect3d <dominik.b.czarnota@gmail.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Changbin Du <changbin.du@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: John Keeping <john@metanate.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Michael Lentine <mlentine@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200309104855.3775-1-dominik.b.czarnota@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 14:25:24 +02:00
..
include A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
intel-pt-decoder x86/insn: Fix awk regexp warnings 2020-04-07 12:37:06 +02:00
scripting-engines A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
abspath.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
alias.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
annotate.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
annotate.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
auxtrace.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
auxtrace.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bitmap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bpf-loader.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bpf-loader.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Build A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
build-id.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
build-id.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cache.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
callchain.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
callchain.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cgroup.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cgroup.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cloexec.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cloexec.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
color.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
color.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
comm.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
comm.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
config.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
counts.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
counts.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpumap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpumap.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ctype.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
data-convert-bt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
data-convert-bt.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
data.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
data.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
db-export.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
db-export.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
debug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
debug.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dso.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dso.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
dwarf-aux.c perf probe: Fix to show function entry line as probe-able 2020-04-07 13:22:37 +02:00
dwarf-aux.h perf probe: Fix to show function entry line as probe-able 2020-04-07 13:22:37 +02:00
env.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
env.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
environment.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
event.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
event.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
evlist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
evlist.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
evsel.c perf evsel: Make perf_evsel__name() accept a NULL argument 2020-04-06 19:55:01 +02:00
evsel.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
exec_cmd.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
exec_cmd.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
find-vdso-map.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
generate-cmdlist.sh A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
header.c perf header: Fix use of unitialized value warning 2020-04-06 20:48:56 +02:00
header.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
help.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
help.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hist.c perf tools: Fix time sorting 2020-04-07 11:48:37 +02:00
hist.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
intel-bts.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
intel-bts.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
intel-pt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
intel-pt.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
intlist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
intlist.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
kvm-stat.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
levenshtein.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
levenshtein.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
llvm-utils.c perf llvm: Don't access out-of-scope array 2020-04-07 08:09:48 +02:00
llvm-utils.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lzma.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
machine.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
machine.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
map.c perf map: Fix off by one in strncpy() size argument 2020-04-07 14:25:24 +02:00
map.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ordered-events.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ordered-events.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pager.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parse-branch-options.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parse-branch-options.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parse-events.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parse-events.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parse-events.l A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parse-events.y A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parse-options.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parse-options.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parse-regs-options.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
parse-regs-options.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
path.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
perf_regs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
perf_regs.h perf regs: Make perf_reg_name() return "unknown" instead of NULL 2020-04-07 13:23:37 +02:00
PERF-VERSION-GEN A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pmu.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pmu.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pmu.l A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pmu.y A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
probe-event.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
probe-event.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
probe-file.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
probe-file.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
probe-finder.c perf probe: Do not depend on dwfl_module_addrsym() 2020-04-07 14:24:09 +02:00
probe-finder.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pstack.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pstack.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
python-ext-sources A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
python.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
quote.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
quote.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rblist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rblist.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
record.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
run-command.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
run-command.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
session.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
session.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
setup.py A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sigchain.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sigchain.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sort.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sort.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
srcline.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
stat-shadow.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
stat.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
stat.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
strbuf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
strbuf.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
strfilter.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
strfilter.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
string.c perf tools: No need to include bitops.h in util.h 2020-04-06 18:15:24 +02:00
strlist.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
strlist.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
svghelper.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
svghelper.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
symbol-elf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
symbol-minimal.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
symbol.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
symbol.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
target.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
target.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
thread_map.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
thread_map.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
thread-stack.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
thread-stack.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
thread.c perf db-export: Fix thread__exec_comm() 2020-04-06 20:38:26 +02:00
thread.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tool.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
top.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
top.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace-event-info.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace-event-parse.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace-event-read.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace-event-scripting.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace-event.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace-event.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tsc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tsc.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
unwind-libdw.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
unwind-libdw.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
unwind-libunwind.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
unwind.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
usage.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
util.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
util.h perf tools: No need to include bitops.h in util.h 2020-04-06 18:15:24 +02:00
values.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
values.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vdso.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vdso.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wrapper.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xyarray.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xyarray.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
zlib.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30