serge1 / ELFIO

ELFIO - ELF (Executable and Linkable Format) reader and producer implemented as a header only C++ library
http://serge1.github.io/ELFIO
MIT License
706 stars 152 forks source link

ELFIO::elfio::load hangs when loading malformed ELF file #99

Closed Alan-Jowett closed 2 years ago

Alan-Jowett commented 2 years ago

llvm-objdump.exe: error: 'timeout-8e50dc5ee0476def74f5316fa96e058cb37eea05': invalid e_shentsize in ELF header: 65535 timeout-8e50dc5ee0476def74f5316fa96e058cb37eea05.zip

While parsing the ELF file, elfio::load_segments ignores failure to read resulting in the parsing of the same segment repeatedly.

Alan-Jowett commented 2 years ago

https://github.com/microsoft/ebpf-for-windows/issues/1193