diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-05-19 06:52:53 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2026-05-19 06:53:35 +0000 |
| commit | 4617a6cb82a673b02257257c1f5f8a3c8d2bb943 (patch) | |
| tree | b3eabaaf4b430af03ff1adc5497e533bac8363a4 /source/Target | |
| parent | 8d36ec1c9c5b7c545e1a7584e66e1ff9b9798ee7 (diff) | |
nlist: Handle multiple symbol tables
* Instead of looking for and stopping at the first SHT_SYMTAB section,
iterate over all SHT_DYNSYM and SHT_SYMTAB sections until we've either
found all our symbols or run out.
* Perform bounds checks on section and string table offsets and sizes
before attempting to mmap() the string table.
* Perform bounds checks on individual symbol table entries before
attempting to access the corresponding strings.
* Stop treating _Foo and Foo as the same symbol.
This unbreaks OpenSSH which uses nlist(3) to verify PKCS#11 providers.
PR: 295336
MFC after: 1 week
Fixes: 77909f597881 ("Initial elf nlist support [...]")
Fixes: 644b4646c7ac ("OpenSSH: Update to 10.1p1")
Reviewed by: kib, emaste
Differential Revision: https://reviews.freebsd.org/D57034
Diffstat (limited to 'source/Target')
0 files changed, 0 insertions, 0 deletions
