It is possible to trigger reading past the EOF by breaking fields like
DT_PLTRELSZ, DT_RELSZ or DT_RELASZ
This patch adds a validation in DynRegionInfo helper class.
Paths
| Differential D91787
[llvm-readobj] - Don't crash when relocation table goes past the EOF. ClosedPublic Authored by grimar on Nov 19 2020, 5:18 AM.
Details Summary It is possible to trigger reading past the EOF by breaking fields like This patch adds a validation in DynRegionInfo helper class.
Diff Detail
Event Timelinegrimar retitled this revision from [llvm-readobj] - Don't crash when relocation table size is past the EOF. to [llvm-readobj] - Don't crash when relocation table goes past the EOF.. Comment Actions
Perhaps we could can add it to each test where we print warnings jsut in case.
This revision is now accepted and ready to land.Nov 20 2020, 3:34 AM grimar added inline comments.
Closed by commit rG2584e1e324c9: [llvm-readobj] - Don't crash when relocation table goes past the EOF. (authored by grimar). · Explain WhyNov 22 2020, 11:40 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 306960 llvm/test/tools/llvm-readobj/ELF/broken-dynamic-reloc.test
llvm/tools/llvm-readobj/ELFDumper.cpp
|
Can't you change users of this overload in the same way, so that there's always an object?