summaryrefslogtreecommitdiff
path: root/lib/libc/gen/nlist.c
AgeCommit message (Collapse)Author
2015-12-29Verify that the section header size supplied in the ELF header is whatmmcc
we expect it to be. This prevents out-of-bounds access or excessive memory allocation on a malformed ELF header. Found by Serguey Parkhomovsky with AFL. Improved by and ok kettenis@
2015-10-16Check file sizes only for regular files. The current code breaks savecoreTobias Stoeckmann
due to its kvm handling. ok deraadt
2015-10-16Merge nlist out of boundary access fix with other nlist implementations.Tobias Stoeckmann
While at it, merge style and typo fixes back into nlist(3), too. ok deraadt, jsing, millert
2015-10-16Validate parsed ELF values to prevent out of boundary accesses.Tobias Stoeckmann
While at it, return proper return value when encountering a stripped binary. Instead of -1 (illegal file), it should be the amount of symbols that were tried to be resolved. ok millert
2015-10-04__fdnlist() is exported for libkvm, but the internal call can go directPhilip Guenther
2015-08-27ELF uberalles: remove #ifdef _NLIST_DO_ELF testsPhilip Guenther
2015-08-26Hide many (194!) symbols that nothing should be using.Philip Guenther
Delete exect(2); it wasn't portable across archs and nothing used it. ports test build by naddy@ ok deraadt@ kettenis@
2015-02-06SIZE_MAX is standard, we should be using it in preference to theTodd C. Miller
obsolete SIZE_T_MAX. OK miod@ beck@
2015-01-16Move to the <limits.h> universe.Theo de Raadt
review by millert, binary checking process with doug, concept with guenther
2014-01-19Rename the hidden symbol __elf_fdnlist to __fdnlist, and remove theTheo de Raadt
format handling wrapper. __fdnlist is used by libkvm. Avoid cranking libc because the time is inconvenient, and __elf_fdnlist is not used anywhere. ok millert jsing
2013-10-17Remove support for a.out and ecoff. We only do elf now.Theo de Raadt
ok miod
2011-07-03"it's" -> "its" in a couple of comments.Kenneth R Westerback
2011-04-08a_syms is an int, not a pointer; ok miodTheo de Raadt
2008-06-04olf support starts to die (easy stuff first); ok miodTheo de Raadt
2005-11-28some nice off_t casts to please lintTheo de Raadt
2005-08-08zap remaining rcsid.Marc Espie
Kill old files that are no longer compiled. okay theo
2005-03-25deregister (and deauto!). ok millert@ marco@Otto Moerbeek
2004-09-15prettyTheo de Raadt
2004-05-18ansify function definitions and zap some `register'Jean-Francois Brousseau
ok millert@
2004-01-30Fix a logic thinko I made in rev. 1.27. This fixes nlist whenTodd C. Miller
the user passes in a symbol name with an underscore pre-pended on ELF systems.
2003-08-27sync STT_NOTYPE parsign w/ kvm_mkdb; pb@ testingMichael Shalayeff
2003-06-25protosTheo de Raadt
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-03-10duplicate words and spelling fixes in commentsDavid Krause
ok miod@
2002-06-11random cleanup that's cheaper to commit than to remove from my tree.Artur Grabowski
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-07-09a first pass at -WallTheo de Raadt
2001-05-11MAP_SHARED is better. Maybe we're trying to map /dev/ksyms.Artur Grabowski
And we'll never write to those mappings anyway.
2001-05-11MAP_COPY -> MAP_PRIVATEArtur Grabowski
2001-05-01Use pread() to avoid lseek() abuse, from art's todo list. Tested withAaron Campbell
config(8) UKC; millert@ ok
2001-02-03Fix the the elf nlist for cases where we can't mmap the headers.Artur Grabowski
This makes /dev/ksyms work (when that code is commited).
2001-01-25ELf-size independent nlist.Artur Grabowski
2000-10-12MAP_FAILED, not -1.Artur Grabowski
1999-08-17More <sys/file.h> vs. <fcntl.h> and open() flags fixes.Todd C. Miller
1998-10-04For a.out, try mmap first (like we used to do) and only malloc() if that ↵Todd C. Miller
fails (for ksyms). Also clean up some mmap/malloc leaks.
1998-09-24back out gzip support, it will not make it for 2.4Todd C. Miller
1998-09-08__alpha__, not alphaTodd C. Miller
1998-09-07make work on pmaxTodd C. Miller
1998-09-05Add support for nlisting against a gzipped kernel, #ifdef'd out sinceTodd C. Miller
it requires linking with -lz. savecore will use this to operate on gzipped kernels.
1998-08-23Strip leading '_' from symbol to lookup if symbols in file lack leading '_'.Todd C. Miller
Needed to make nlist of /dev/ksyms work correctly on non-a.out kernels.
1998-08-21I committed the wrong version before, here is the correct oneTodd C. Miller
1998-08-21For a.out use read, not mmap, to get the string table so this works onTodd C. Miller
/dev/ksyms. mmap was only used because, at the time, free did not give memory back to the system (our malloc/free uses mmap/munmap so we are ok).
1998-01-20type botchTheo de Raadt
1998-01-02make mmap() return void *, add MAP_FAILEDTheo de Raadt
1997-12-15MAP_COPY|MAP_FILE; mrg. indent tooTheo de Raadt
1997-07-23tabifykstailey
1997-07-01Make -Wall happy.Todd C. Miller
1997-01-10Leading underscores... Actually, they really DID fuck this up on the MIPSetheisen
and PPC platforms... Everyone else has _leading!
1997-01-09ELF does not use the leading '_' on any port, not just MIPS.Dale S. Rahn
1996-12-23use _{NLIST,KERN}_DO_{AOUT,ELF,ECOFF} to select binary typesTheo de Raadt