[all-commits] [llvm/llvm-project] 56970e: [llvm-readobj] - --gnu-hash-table: do not crash wh...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Fri May 15 01:41:12 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 56970ec6a0bed5ba4312872eed13137ca43f67fb
      https://github.com/llvm/llvm-project/commit/56970ec6a0bed5ba4312872eed13137ca43f67fb
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M llvm/test/tools/llvm-readobj/ELF/gnuhash.test
    M llvm/tools/llvm-readobj/ELFDumper.cpp
    M llvm/tools/llvm-readobj/ObjDumper.h
    M llvm/tools/llvm-readobj/llvm-readobj.cpp

  Log Message:
  -----------
  [llvm-readobj] - --gnu-hash-table: do not crash when the GNU hash table goes past the EOF.

We might have a scenario where a the `GbuHashTable` variable correctly points
to a place inside the file (we validate this fact early in `parseDynamicTable`),
but nbuckets/maskwords fields are broken in the way the code tries
to read the data past the EOF. This patch fixes the issue.

Differential revision: https://reviews.llvm.org/D79853




More information about the All-commits mailing list