aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/diagnostics/(developers-only)
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2026-09-13 10:10:37 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2026-09-14 21:55:01 +0000
commitfa848d4d0c0371cdbf39265b6528f4c61bc02c7d (patch)
tree896810708b121f95145c2432b9eeaaac83f3bd33 /test/Analysis/diagnostics/(developers-only)
parent2ef97312d5d46aeaeb26f6e5815d964412bc499e (diff)
rtld: more caution when parsing in digest_notes()HEADmain
Incorrect ELF might have PT_NOTE slightly larger than the needed to contain all notes, and the PT_NOTE size could be larger than one page. Then rtld mmaps just the notes bytes to parse. After the last note, we iterate past the mapped region trying to read the Elf_Note header. This was found in wild. Require full elf note to fit into the [start_note, end_note) region to continue the parsing. Check it in stages, first verifying the Elf_Note header structure fits, to be able to read the name and data length. After that, check the whole note against limit. Reported and tested by: makc Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D59635
Diffstat (limited to 'test/Analysis/diagnostics/(developers-only)')
0 files changed, 0 insertions, 0 deletions