Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[[email protected]:301] IndexError: list index out of range #432

Closed
bugfinder-bot opened this issue Aug 14, 2024 · 3 comments · Fixed by #433
Closed

[[email protected]:301] IndexError: list index out of range #432

bugfinder-bot opened this issue Aug 14, 2024 · 3 comments · Fixed by #433
Labels
bug Something isn't working bugfinder

Comments

@bugfinder-bot
Copy link
Collaborator

What happened?

  File "/opt/dewolf/decompiler/util/bugfinder/bugfinder.py", line 201, in iter_function_reports
    task, code = self.decompile(function, task_options=options)
  File "/opt/dewolf/decompile.py", line 80, in decompile
    result = self.decompile_all([function_id], task_options)
  File "/opt/dewolf/decompile.py", line 64, in decompile_all
    self._frontend.lift(task)
  File "/opt/dewolf/decompiler/frontend/binaryninja/frontend.py", line 83, in lift
    raise e
  File "/opt/dewolf/decompiler/frontend/binaryninja/frontend.py", line 76, in lift
    task.cfg = parser.parse(function)
  File "/opt/dewolf/decompiler/frontend/binaryninja/parser.py", line 49, in parse
    index_to_BasicBlock[basic_block.index] = BasicBlock(basic_block.index, instructions=list(self._lift_instructions(basic_block)))
  File "/opt/dewolf/decompiler/frontend/binaryninja/parser.py", line 148, in _lift_instructions
    if lifted_instruction := self._lifter.lift(instruction):
  File "/opt/dewolf/decompiler/frontend/binaryninja/lifter.py", line 33, in lift
    if pseudo_expression := handler(expression, **kwargs):
  File "/opt/dewolf/decompiler/frontend/binaryninja/handlers/assignments.py", line 56, in lift_assignment
    self._lifter.lift(assignment.src, parent=assignment),
  File "/opt/dewolf/decompiler/frontend/binaryninja/lifter.py", line 33, in lift
    if pseudo_expression := handler(expression, **kwargs):
  File "/opt/dewolf/decompiler/frontend/binaryninja/handlers/binary.py", line 52, in lift_binary_operation
    [self._lifter.lift(x, parent=operation) for x in operation.operands],
  File "/opt/dewolf/decompiler/frontend/binaryninja/handlers/binary.py", line 52, in <listcomp>
    [self._lifter.lift(x, parent=operation) for x in operation.operands],
  File "/opt/dewolf/decompiler/frontend/binaryninja/lifter.py", line 33, in lift
    if pseudo_expression := handler(expression, **kwargs):
  File "/opt/dewolf/decompiler/frontend/binaryninja/handlers/constants.py", line 44, in lift_constant
    return self.lift_constant_pointer(constant)
  File "/opt/dewolf/decompiler/frontend/binaryninja/handlers/constants.py", line 70, in lift_constant_pointer
    res = self._lifter.lift(DataVariable(view, pointer.constant, Type.void(), False), view=view, parent=pointer)
  File "/opt/dewolf/decompiler/frontend/binaryninja/lifter.py", line 33, in lift
    if pseudo_expression := handler(expression, **kwargs):
  File "/opt/dewolf/decompiler/frontend/binaryninja/handlers/globals.py", line 158, in lift_global_variable
    return self._lift_datavariable_by_type[type(variable.type)](variable, parent, callers=callers)
  File "/opt/dewolf/decompiler/frontend/binaryninja/handlers/globals.py", line 196, in _lift_void_type
    value, type = self._get_unknown_value(variable)
  File "/opt/dewolf/decompiler/frontend/binaryninja/handlers/globals.py", line 250, in _get_unknown_value
    rbytes = get_raw_bytes(variable.address, self._view)
  File "/opt/dewolf/decompiler/frontend/binaryninja/handlers/globals.py", line 301, in get_raw_bytes
    return view.read(addr, view.get_sections_at(addr)[0].end)

Error class [email protected]:301 contains 2 cases.

How to reproduce?

python decompile.py 79356978483c170eed80e50c844ef59ed47904bbde657bde26bc400a7addcb36 magicmouse_battery_timer_tick --debug

sample: 79356978483c170eed80e50c844ef59ed47904bbde657bde26bc400a7addcb36
case: https://bugfinder.seclab-bonn.de/case/61636/
dewolf commit: ad2f8a3
Binaryninja version: 3.5.4526

@bugfinder-bot bugfinder-bot added bug Something isn't working bugfinder labels Aug 14, 2024
@NeoQuix
Copy link
Collaborator

NeoQuix commented Aug 14, 2024

\cib

@NeoQuix
Copy link
Collaborator

NeoQuix commented Aug 14, 2024

/cib

Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bugfinder
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants