diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-13 19:59:39 +0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-17 15:21:03 +0300 |
| commit | fe63d3bca288c5bb983304efd5fc3a5ff3183403 (patch) | |
| tree | 98d4d90a698d425c5fb056c28d15965db5185c01 /scripts | |
| parent | 8a4506595857356fcef9f7aad3506593e9fabbbc (diff) | |
| download | linux-fe63d3bca288c5bb983304efd5fc3a5ff3183403.tar.xz | |
perf machine: Use snprintf() for guestmount path construction
machines__findnew() and machines__create_guest_kernel_maps() use
sprintf() to build paths by prepending symbol_conf.guestmount.
Both write into PATH_MAX stack buffers, but guestmount comes from
user configuration and is not length-checked. A guestmount path
at or near PATH_MAX causes a stack buffer overflow.
Switch to snprintf() with sizeof() to prevent overflow. The
subsequent access()/fopen() calls will fail on a truncated path.
Fixes: a1645ce12adb6c9c ("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>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
