summaryrefslogtreecommitdiffstats
path: root/lib/libelf/elf_scn.c
Commit message (Collapse)AuthorAgeFilesLines
* libelf: Improve ELF header validationemaste2015-01-231-2/+5
| | | | | | Avoid integer overflow and reading past EOF. MFC of r276427, r276443, r277249 from contrib/elftoolchain.
* Perform additional checks when translating between file and memorykaiw2010-07-211-2/+3
| | | | | | | | | | | | | | | | | | | representations of ELF types. The ELF(3) API allows applications to request a conversion that is `in-place', i.e., with source and destinations data buffers being the same. However, the file and memory sizes of ELF sections that have additional internal structure, such as those of type `Elf_Note', or `Elf_GNU_Hash_Header', can be determined only known after the type-specific headers that comprise the first few words in these sections are read and translated. Pass in the size of destination buffer to type translation routines in "libelf_convert.m4" and have these routines return an error code if the translated data would not fit inside the destination buffer. Obtained from: elftoolchain MFC after: 1 month
* Allow an application that updates only the ELF Ehdr to work.kaiw2010-07-211-1/+1
| | | | | Obtained from: elftoolchain MFC after: 1 month
* Keep shadow copies of the `e_shnum', `e_phnum' and `e_shstrndx'jkoshy2006-12-251-42/+26
| | | | | | | | | | | | | | | members of the ELF Executable Header inside the library-private `struct _Elf' descriptor and only update the underlying Elf{32,64}_Ehdr structure on an elf_update(3) call. These fields of the Ehdr structure are technically `out of bounds' for an application program per the ELF(3) API, but we've seen applications that initialize a new Ehdr structure using memcpy(), messing up the library's invariants. [1] Implement elf_getphnum() and handle ELF objects with more than 64K program header table entries. Reported by: jb [1]
* MFP4: Add an implementation of the ELF(3) and GELF(3) API set.jkoshy2006-11-111-0/+244
Bump __FreeBSD_version. Reviewed by: jb
OpenPOWER on IntegriCloud