vbpf / ebpf-verifier

eBPF verifier based on abstract interpretation
MIT License
386 stars 41 forks source link

ELFIO_section_impl<T>::load segfaults on out of memory #239

Closed Alan-Jowett closed 3 years ago

Alan-Jowett commented 3 years ago

If new on this line throws: https://github.com/vbpf/ebpf-verifier/blob/41c50e92feb592d792b64f90d8811096450d6790/external/elfio/elfio_section.hpp#L249

Then it segfaults on this line: https://github.com/vbpf/ebpf-verifier/blob/41c50e92feb592d792b64f90d8811096450d6790/external/elfio/elfio_section.hpp#L256

This was caught using Visual Studio's Static Analysis tool.

dthaler commented 3 years ago

Seems to be fixed in https://github.com/serge1/ELFIO/blob/master/elfio/elfio_section.hpp#L204 so maybe the best fix is to pull in the latest elfio as a submodule and remove the old copy of the code from this repo.