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

CFG of arm binary returns wrong function name #4619

Open
d05004 opened this issue May 6, 2024 · 2 comments
Open

CFG of arm binary returns wrong function name #4619

d05004 opened this issue May 6, 2024 · 2 comments
Assignees
Labels
bug Something is broken

Comments

@d05004
Copy link

d05004 commented May 6, 2024

Description

When analyzing an arm ELF binary, the CFG returns wrong function name.

Steps to reproduce the bug

>>> import angr
>>> proj = angr.Project("./test.txt",auto_load_libs=False)
>>> proj.analyses.CFGFast(normalize=True)
>>> print(proj.kb.functions[0x10c10])

It returns function name goodB2GSource.
image

But when I debug it with ida, the function name is badSource.
image
Here is binary for reproduce.
test.txt

Environment

No response

Additional context

No response

@d05004 d05004 added bug Something is broken needs-triage Issue has yet to be looked at by a maintainer labels May 6, 2024
@ltfish ltfish removed the needs-triage Issue has yet to be looked at by a maintainer label May 21, 2024
@ltfish ltfish self-assigned this May 21, 2024
@ltfish
Copy link
Member

ltfish commented May 21, 2024

There are conflicting symbols in this binary: 0x10c10 is both badSource and goodB2GSource. angr prioritizes symbol names (which is not a feature. It just happens to work this way) while IDA prioritizes DWARF information (where there is a badSource subprogram in DWARF). You can force IDA to output goodB2GSource as the function name of 0x10c10 if you choose to not load debug information in IDA.

@ltfish
Copy link
Member

ltfish commented May 21, 2024

I think it would be nice for angr management to display all symbols that correspond to an address (e.g., as alternative function names).

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

2 participants