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

BARF fails to disassemble /bin/true #8

Closed
neuromancer opened this issue Mar 25, 2015 · 1 comment
Closed

BARF fails to disassemble /bin/true #8

neuromancer opened this issue Mar 25, 2015 · 1 comment

Comments

@neuromancer
Copy link

Using recover_cfg.py to disassemble /bin/true fails:

[+] Recovering program CFG...
[-] Index out of range : 0x40133f
Traceback (most recent call last):
  File "./recover_cfg.py", line 28, in <module>
    cfg = barf.recover_cfg()
  File "/home/g/Codigo/barf-project/barf/barf/barf.py", line 294, in recover_cfg
    bb_list = self.bb_builder.build(start_addr, end_addr)
  File "/home/g/Codigo/barf-project/barf/barf/analysis/basicblock/basicblock.py", line 368, in build
    bbs = self._find_candidate_bbs(start_address, end_address)
  File "/home/g/Codigo/barf-project/barf/barf/analysis/basicblock/basicblock.py", line 426, in _find_candidate_bbs
    bb = self._disassemble_bb(curr_addr, end_address + 0x1)
  File "/home/g/Codigo/barf-project/barf/barf/analysis/basicblock/basicblock.py", line 548, in _disassemble_bb
    asm = self._disasm.disassemble(self._mem[start:end], addr)
  File "/home/g/Codigo/barf-project/barf/barf/core/bi.py", line 67, in __getitem__
    raise IndexError(reason)
IndexError: string index out of range

where /bin/true is a ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=9d915e13fb31a59c4d02b39bd596af20873aca0b, stripped

@cnheitman
Copy link
Collaborator

Done. Fix in commit 2034b1f.

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

No branches or pull requests

2 participants