-
-
Notifications
You must be signed in to change notification settings - Fork 495
Comparing changes
Open a pull request
base repository: NixOS/patchelf
base: 47dc18d0e5c1
head repository: NixOS/patchelf
compare: 57ad111ab4c5
- 15 commits
- 9 files changed
- 2 contributors
Commits on Nov 15, 2020
-
Add ELF test case with invalid string table index
Parsing this file results in patchelf triggering an assertion: patchelf: patchelf.cc:431: ElfFile<Elf64_Ehdr, Elf64_Phdr, Elf64_Shdr, unsigned long, unsigned long, Elf64_Dyn, Elf64_Sym, Elf64_Verneed, unsigned short>::ElfFile(FileContents) [Elf_Ehdr = Elf64_Ehdr, Elf_Phdr = Elf64_Phdr, Elf_Shdr = Elf64_Shdr, Elf_Addr = unsigned long, Elf_Off = unsigned long, Elf_Dyn = Elf64_Dyn, Elf_Sym = Elf64_Sym, Elf_Verneed = Elf64_Verneed, Elf_Versym = unsigned short]: Assertion `shstrtabIndex < shdrs.size()' failed. Program received signal SIGABRT, Aborted.
Configuration menu - View commit details
-
Copy full SHA for 1457195 - Browse repository at this point
Copy the full SHA 1457195View commit details -
Configuration menu - View commit details
-
Copy full SHA for b552c30 - Browse repository at this point
Copy the full SHA b552c30View commit details -
Add test case with invalid shrstab size
Parsing this file results in patchelf triggering an assertion: patchelf: patchelf.cc:384: void checkPointer(const FileContents &, void *, unsigned int): Assertion `q >= contents->data() && q + size <= contents->data() + contents->size()' failed. Aborted (core dumped)
Configuration menu - View commit details
-
Copy full SHA for 1162de5 - Browse repository at this point
Copy the full SHA 1162de5View commit details -
Configuration menu - View commit details
-
Copy full SHA for a954a08 - Browse repository at this point
Copy the full SHA a954a08View commit details -
Add ELF test case with empty string table
Parsing this file results in patchelf triggering an assertion: patchelf: patchelf.cc:439: ElfFile<Elf64_Ehdr, Elf64_Phdr, Elf64_Shdr, unsigned long, unsigned long, Elf64_Dyn, Elf64_Sym, Elf64_Verneed, unsigned short>::ElfFile(FileContents) [Elf_Ehdr = Elf64_Ehdr, Elf_Phdr = Elf64_Phdr, Elf_Shdr = Elf64_Shdr, Elf_Addr = unsigned long, Elf_Off = unsigned long, Elf_Dyn = Elf64_Dyn, Elf_Sym = Elf64_Sym, Elf_Verneed = Elf64_Verneed, Elf_Versym = unsigned short]: Assertion `shstrtabSize > 0' failed. Aborted (core dumped)
Configuration menu - View commit details
-
Copy full SHA for 62e39e0 - Browse repository at this point
Copy the full SHA 62e39e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for cee8c8c - Browse repository at this point
Copy the full SHA cee8c8cView commit details -
Add test case with non-terminated string table
Parsing this file results in patchelf triggering an assertion: patchelf: patchelf.cc:442: ElfFile<Elf64_Ehdr, Elf64_Phdr, Elf64_Shdr, unsigned long, unsigned long, Elf64_Dyn, Elf64_Sym, Elf64_Verneed, unsigned short>::ElfFile(FileContents) [Elf_Ehdr = Elf64_Ehdr, Elf_Phdr = Elf64_Phdr, Elf_Shdr = Elf64_Shdr, Elf_Addr = unsigned long, Elf_Off = unsigned long, Elf_Dyn = Elf64_Dyn, Elf_Sym = Elf64_Sym, Elf_Verneed = Elf64_Verneed, Elf_Versym = unsigned short]: Assertion `shstrtab[shstrtabSize - 1] == 0' failed. Aborted (core dumped)
Configuration menu - View commit details
-
Copy full SHA for e57205f - Browse repository at this point
Copy the full SHA e57205fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a8214c - Browse repository at this point
Copy the full SHA 7a8214cView commit details -
Add test case with invalid section header sh_name
Parsing this file results in patchelf segfaulting at: at /nix/store/h31cy7jm6g7cfqbhc5pm4rf9c53i3qfb-gcc-9.3.0/include/c++/9.3.0/bits/char_traits.h:335 at /nix/store/h31cy7jm6g7cfqbhc5pm4rf9c53i3qfb-gcc-9.3.0/include/c++/9.3.0/bits/basic_string.h:527 this=0x7fffffff8028, fileContents=...) at patchelf.cc:449
Configuration menu - View commit details
-
Copy full SHA for de9fa4d - Browse repository at this point
Copy the full SHA de9fa4dView commit details -
Add bounds checking for invalid section header name offsets
... otherwise strlen() (in the std::string constructor) will be called with an out-of-bounds pointer.
Configuration menu - View commit details
-
Copy full SHA for fa8896a - Browse repository at this point
Copy the full SHA fa8896aView commit details -
Add test case with invalid phdr offset
Parsing this file results in patchelf segfaulting at: Program received signal SIGSEGV, Segmentation fault. std::vector<Elf32_Phdr, std::allocator<Elf32_Phdr> >::_M_realloc_insert<Elf32_Phdr const&> (this=0x7fffffff80a8, __position=..., __args=...) at /nix/store/h31cy7jm6g7cfqbhc5pm4rf9c53i3qfb-gcc-9.3.0/include/c++/9.3.0/bits/vector.tcc:449 449 _Alloc_traits::construct(this->_M_impl, (gdb) bt at /nix/store/h31cy7jm6g7cfqbhc5pm4rf9c53i3qfb-gcc-9.3.0/include/c++/9.3.0/bits/vector.tcc:449 at /nix/store/h31cy7jm6g7cfqbhc5pm4rf9c53i3qfb-gcc-9.3.0/include/c++/9.3.0/bits/stl_vector.h:1195 this=0x7fffffff8088, fileContents=...) at patchelf.cc:421
Configuration menu - View commit details
-
Copy full SHA for c105b1c - Browse repository at this point
Copy the full SHA c105b1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 52e9dd5 - Browse repository at this point
Copy the full SHA 52e9dd5View commit details -
Fix endian issue when creating sectionsByOldIndex
sectionsByOldIndex was resized to hdr->e_shnum instead of rdi(hdr->e_shnum). This omitted the endianness conversion and probably only worked by accident, because the 16-bit LE->BE conversion results in integers that are larger as long as there no more than 255 section headers. This would be a good usecase for std::transform, but I'm unsure whether we want to bump requirements to build patchelf to C++ 2017.
Configuration menu - View commit details
-
Copy full SHA for d148bae - Browse repository at this point
Copy the full SHA d148baeView commit details -
Gracefully handle ELF files with out-of-bounds shdr offsets
This is similar to the earlier fix for phdr offsets, but the fuzzer didn't find this.
Configuration menu - View commit details
-
Copy full SHA for 883fdf9 - Browse repository at this point
Copy the full SHA 883fdf9View commit details
Commits on Nov 16, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 57ad111 - Browse repository at this point
Copy the full SHA 57ad111View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 47dc18d0e5c1...57ad111ab4c5