summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2026-06-10 22:09:45 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-06-11 00:56:02 +0300
commit52e582e316c48c53bb3082c29f7862ebc554087e (patch)
tree28a7c8d43e95569b027775ce35c21896bba4046f /scripts/Makefile.thinlto
parentacc56d3941fc2997a5a21ea9233a8ac3d87c4f2f (diff)
downloadlinux-52e582e316c48c53bb3082c29f7862ebc554087e.tar.xz
perf symbols: Add bounds checks to read_build_id() note iteration in minimal build
symbol-minimal.c's read_build_id() iterates ELF notes with the same pattern as symbol-elf.c's elf_read_build_id(): pointer arithmetic driven by n_namesz and n_descsz from 32-bit note header fields, without validating that the name and desc fit within the note section data. A malformed ELF file with oversized note sizes causes out-of-bounds reads past the section data buffer. Add the same bounds check as the libelf path: validate namesz and descsz individually against remaining data before advancing the pointer, avoiding size_t overflow on 32-bit. Fixes: b691f64360ecec49 ("perf symbols: Implement poor man's ELF parser") Reported-by: sashiko-bot <sashiko-bot@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Assisted-by: Claude:claude-opus-4.6 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions