danielplohmann / smda

SMDA is a minimalist recursive disassembler library that is optimized for accurate Control Flow Graph (CFG) recovery from memory dumps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unhandled AssertionError Processing ELF File

schrodyn opened this issue · comments

Spotted this error while processing an ELF file with MCRIT in dir mode and wanted to report it. File hash d2f94e178c254669fb9656d5513356d2

ERROR: SMDA caused an exception while processing this file: Samples/d2f94e178c254669fb9656d5513356d2
Traceback (most recent call last):
  File "/usr/home/schrodinger/.local/src/mcrit/mcrit/client/McritConsole.py", line 109, in getSmdaReportFromFilepath
    smda_report = disassembler.disassembleFile(filepath)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/schrodinger/.venv/mcrit/lib/python3.11/site-packages/smda/Disassembler.py", line 42, in disassembleFile
    loader = FileLoader(file_path, map_file=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/schrodinger/.venv/mcrit/lib/python3.11/site-packages/smda/utility/FileLoader.py", line 22, in __init__
    self._loadFile()
  File "/home/schrodinger/.venv/mcrit/lib/python3.11/site-packages/smda/utility/FileLoader.py", line 36, in _loadFile
    self._data = loader.mapBinary(self._raw_data)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/schrodinger/.venv/mcrit/lib/python3.11/site-packages/smda/utility/ElfFileLoader.py", line 113, in mapBinary
    assert len(segment.content) == segment.physical_size
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

... and this should be now addressed with v1.13.9 as well.