m4b / goblin

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

Fix size check for section headers #249

Closed jan-auer closed 3 years ago

jan-auer commented 3 years ago

The section header size check introduced in #243 compares the virtual memory address range sh_addr with the physical file size. This leads to a false-positive invariant violation and fails to parse valid ELF files.

See also https://github.com/m4b/bingrep/issues/28

cc @jackmay

jan-auer commented 3 years ago

Super quick turnaround, thanks a bunch @m4b!