When something is wrong with the GNU hash table header we dump
its context as a raw data.
Currently we have the calculation overflow issue and it is possible to
bypass the validation we have (and crash).
The patch fixes it.
Paths
| Differential D93760
[obj2yaml] - Dump the content of a broken GNU hash table properly. ClosedPublic Authored by grimar on Dec 23 2020, 5:25 AM.
Details Summary When something is wrong with the GNU hash table header we dump Currently we have the calculation overflow issue and it is possible to The patch fixes it.
Diff Detail
Event TimelineComment Actions Looks great!
This revision is now accepted and ready to land.Dec 23 2020, 11:43 AM Closed by commit rGb8cb1802a8a2: [obj2yaml] - Dump the content of a broken GNU hash table properly. (authored by grimar). · Explain WhyDec 24 2020, 12:23 AM This revision was automatically updated to reflect the committed changes. grimar marked an inline comment as done.
Revision Contents
Diff 313668 llvm/test/tools/obj2yaml/ELF/gnu-hash-section.yaml
llvm/tools/obj2yaml/elf2yaml.cpp
|
NBuckets = 0xFFFFFFFF is incorrect. The result will cause 32-bit unsigned overflows if we keep intermediate expressions uint32_t.