diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-07-26 20:40:14 -0300 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2026-07-31 16:42:28 -0700 |
| commit | d04ef71492fad7230d474efe33d05f4c0563d409 (patch) | |
| tree | 24cd4303b673de3dd64497f6a832b1517a5fb760 /scripts | |
| parent | f53bf58dcd11e1cb088d3b91a035fef77062094b (diff) | |
| download | linux-d04ef71492fad7230d474efe33d05f4c0563d409.tar.gz linux-d04ef71492fad7230d474efe33d05f4c0563d409.zip | |
perf machine: Check snprintf truncation for guest kallsyms path
machines__create_guest_kernel_maps() builds the guest kallsyms path
with snprintf() without checking the return value. A truncated path
could pass the access() check if a prefix directory happens to contain
a file named "kallsyms", leading to the wrong file being used for
symbol resolution.
Check for truncation and skip the directory.
Fixes: a1645ce12adb ("perf: 'perf kvm' tool for monitoring guest performance from host")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Cc: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
