m4b / goblin

An impish, cross-platform binary parsing crate, written in Rust
MIT License
1.19k stars 158 forks source link

Only parse the last `SHT_SYMTAB` in `Elf::parse()` #297

Closed Lichtso closed 2 years ago

Lichtso commented 2 years ago

Only parse the last SHT_SYMTAB, because all earlier ones are not used anyway. This improves the runtime complexity from O(n^2) to O(n), and makes the parsing more robust against crazy inputs.

m4b commented 2 years ago

Also I never received that binary which was the original impetus for changing string table to avoid DoS attacks :) would still be interested to see such a thing, can send to my email m4b dot github dot io atsign gmail.com