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

[Lifter] Complex Type Lifting #444

Closed
NeoQuix opened this issue Oct 23, 2024 · 3 comments · Fixed by #445
Closed

[Lifter] Complex Type Lifting #444

NeoQuix opened this issue Oct 23, 2024 · 3 comments · Fixed by #445
Assignees
Labels
bug Something isn't working priority-high High priority issue

Comments

@NeoQuix
Copy link
Collaborator

NeoQuix commented Oct 23, 2024

What happened?

Currently the lifter stores every complex type it encountered during lifting.
Thus, if the globals.py lifts a undesired complex type (such as the ELF-Header) the type will be stored and printed in the backend, even if globals.py disregards (fixes) the type internally.

Therefore, the ELF-Header type is printed in the output, even if the decompiled code does not references it.

How to reproduce?

Decompile [.tar.gz at unary_operator.
The problem is in every function where BNinja yields the ELF header as a datavariable (e.g. every Null-pointer).

Affected Binary Ninja Version(s)

@NeoQuix NeoQuix added bug Something isn't working priority-high High priority issue labels Oct 23, 2024
@NeoQuix NeoQuix self-assigned this Oct 23, 2024
@NeoQuix
Copy link
Collaborator Author

NeoQuix commented Oct 23, 2024

As a temporary fix:
Globals.py can check the value of a datavariable before checking if the variable was already lifted.
Thus, the type will not be lifted and stored as a complex data type.

However, the overall issue, that every lifted complex type is stored still, even if it is not utilized in the code, remains.

@NeoQuix
Copy link
Collaborator Author

NeoQuix commented Oct 23, 2024

/cib

Copy link
Contributor

Branch issue-444-_Lifter_Complex_Type_Lifting created!

github-actions bot added a commit that referenced this issue Oct 23, 2024
0x6e62 added a commit that referenced this issue Nov 22, 2024
* Create draft PR for #444

* Switch Error fix and already lifted

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Spartak Ehrlich <[email protected]>
Co-authored-by: Niklas Bergmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-high High priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant