Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
readelf: fix -n for x86-64 ibt/shstk notes.
I couldn't work out how to get gcc to actually produce such a thing, but /bin/dbxtool on my debian box right now has them. The big mistake here is that GNU property notes' data is always 8-byte aligned, so we needed to skip that. That lets us get rid of the existing loop termination hack to skip padding. While I'm here -- since the symptom was running off the end of the file -- I've also added a bounds check in the property dumping loop. I wish I had fuzzing infrastructure to run AFL++ against this every time it changes... In lieu of that I do wonder whether we should add `readelf -aW /bin/* > /dev/null` as a smoke test that "at least it works for all the _valid_ binaries on the system you're testing on". That would have caught this sooner.
- Loading branch information