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

Function analysis does not add complete packet to function. #31

Open
Rot127 opened this issue Nov 17, 2021 · 1 comment
Open

Function analysis does not add complete packet to function. #31

Rot127 opened this issue Nov 17, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Rot127
Copy link
Member

Rot127 commented Nov 17, 2021

The rizin function analysis stops analyzing the current function, if it encounters a direct jump instruction. This is problematic in our case since the jump instructions often is located at the beginning of a packet. Hence the rest of the packet is not analyzed by the analysis code, although it is executed on a real processor.

Example:

rizin-1
This function should actually look like this:

rizin-2

Possible, but not very nice, solutions:

  • Back up the jump target if jump #Ii is disassembled.
    Once the last instruction of this packet is disassembled, set its type to RZ_ANALYSIS_OP_TYPE_JMP and set RzAnalysisOp.jump = #Ii
  • Dig into the rizin analysis code and add an exception for the hexagon architecture, so it always disassembles until the end of a packet before interpreting the instructions (seems like way too much work).
@Rot127 Rot127 added the bug Something isn't working label Nov 17, 2021
@Rot127
Copy link
Member Author

Rot127 commented Nov 17, 2021

Very similar, if not even the same, like #30

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

No branches or pull requests

1 participant