Skip to content

Fix crash when reading CU with incorrect version

When an ELF file contains CU with an incorrect version value, reading its DIE leads to crash in elf-dissector.

Examples of such files are binaries produced by the OCaml compiler. Some of the generated CU contains unreadable data with cu_version == 0. dwarf_next_cu_header fails with DW_DLV_ERROR in this case here and we fails on this assert because of compilationUnits are empty.

Example binary for the experiments: https://github.com/jubnzv/iec-checker/releases/download/v0.3/iec_checker_Linux_x86_64. Check one of the CamlBase_quick__* functions.

Merge request reports