This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readelf] - Do not crash when relocation references a STT_SECTION symbol for the null section.
ClosedPublic

Authored by grimar on Jun 15 2020, 5:13 AM.

Details

Summary

Currently, llvm-readelf crashes when there is a STT_SECTION symbol for the null section
and this symbol is used in a relocation.

This patch fixes the issue.

Diff Detail

Event Timeline

grimar created this revision.Jun 15 2020, 5:13 AM
Herald added a project: Restricted Project. · View Herald Transcript
jhenderson accepted this revision.Jun 16 2020, 2:00 AM

Nice catch, LGTM. You've now got me wondering how you found this issue!

This revision is now accepted and ready to land.Jun 16 2020, 2:00 AM

Nice catch, LGTM. You've now got me wondering how you found this issue!

I was using AFL (https://lcamtuf.coredump.cx/afl/) to collect broken inputs causing crashes/hangs.
And now I am investigating and trying to fix what I've found.

This revision was automatically updated to reflect the committed changes.