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

Failed to load a binary #4605

Open
Voxanimus opened this issue Apr 24, 2024 · 5 comments
Open

Failed to load a binary #4605

Voxanimus opened this issue Apr 24, 2024 · 5 comments
Assignees
Labels
bug Something is broken

Comments

@Voxanimus
Copy link

Description

I tried to load a binary and get this error:

  File "/usr/local/lib/python3.10/dist-packages/cle/memory.py", line 363, in load
    raise KeyError(addr)
KeyError: -32768

the thing is the the -32768 match is the opposite of the binary base address witch is 0x8000. I don't understand why I get this error and why the key is negative.

Steps to reproduce the bug

No response

Environment

No response

Additional context

No response

@Voxanimus Voxanimus added bug Something is broken needs-triage Issue has yet to be looked at by a maintainer labels Apr 24, 2024
@ltfish
Copy link
Member

ltfish commented Apr 24, 2024

Can you please post the binary or the full stack backtrace?

@ltfish ltfish removed the needs-triage Issue has yet to be looked at by a maintainer label Apr 24, 2024
@Voxanimus
Copy link
Author

Voxanimus commented Apr 24, 2024

Sure here is the backtrace:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/src/trustdymbex/__main__.py", line 347, in <module>
    main(sys.argv[1])
  File "/src/trustdymbex/__main__.py", line 325, in main
    runner: Runner = Runner(binary_path, report.base_address)
  File "/src/trustdymbex/__main__.py", line 122, in __init__
    self._p = Project(
  File "/usr/local/lib/python3.10/dist-packages/angr/project.py", line 224, in __init__
    self.simos.configure_project()
  File "/usr/local/lib/python3.10/dist-packages/angr/simos/linux.py", line 78, in configure_project
    tls_obj = self.project.loader.tls.new_thread()
  File "/usr/local/lib/python3.10/dist-packages/cle/backends/tls/__init__.py", line 33, in new_thread
    thread = self._thread_cls(self)
  File "/usr/local/lib/python3.10/dist-packages/cle/backends/tls/elf_tls.py", line 92, in __init__
    image = thread_manager.initialization_image(obj)
  File "/usr/local/lib/python3.10/dist-packages/cle/backends/tls/__init__.py", line 30, in initialization_image
    return obj.memory.load(obj.tls_data_start, obj.tls_data_size).ljust(obj.tls_block_size, b'\0')
  File "/usr/local/lib/python3.10/dist-packages/cle/memory.py", line 363, in load
    raise KeyError(addr)
KeyError: -32768

For the binary I am not sure I am allowed to share it.

@rhelmot
Copy link
Member

rhelmot commented May 1, 2024

What architecture is this binary built for? it's for linux, right?

@Voxanimus
Copy link
Author

Yap

@rhelmot
Copy link
Member

rhelmot commented May 20, 2024

those were two separate questions. what architecture is it for? amd64? mips? arm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

No branches or pull requests

3 participants