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

Add support for x86-32 gcc "mov r,[r*s+d];jmp r" jumptables #10271

Merged
merged 3 commits into from Jun 13, 2018
Merged

Conversation

radare
Copy link
Collaborator

@radare radare commented Jun 6, 2018

Thanks @rlaemmert for providing test case

  • This PR also improves the analysis of MOV instructions on X86
  • And extends output of 'ao' to show ireg, scale, ...

@radare
Copy link
Collaborator Author

radare commented Jun 6, 2018

please @rlaemmert review/fix the tests and add a test for your calc binary if can be shared

@radare radare requested a review from ret2libc June 6, 2018 10:01
@radare radare requested a review from rlaemmert June 6, 2018 10:01
@radare radare added this to the 2.7.0 milestone Jun 6, 2018
@radare radare added the RAnal label Jun 6, 2018
@radare
Copy link
Collaborator Author

radare commented Jun 6, 2018

to write the test do the following:

$ r2 -e anal.jmptbl=true -s 0x08049203 -caf /tmp/calc.file

and then f~?switch. != 0 and f~?case. != 0

@ret2libc
Copy link
Contributor

ret2libc commented Jun 8, 2018

I'm going to try this tonight/tomorrow and provide feedback! That's definitely something I'm interested in :)

@radare
Copy link
Collaborator Author

radare commented Jun 10, 2018

I have rebased the PR, cc @rlaemmert

@ret2libc
Copy link
Contributor

do we have a testcase for this in r2r?

Thanks @rlaemmert for providing test case

- This PR also improves the analysis of MOV instructions on X86
- And extends output of 'ao' to show ireg, scale, ...
@radare
Copy link
Collaborator Author

radare commented Jun 13, 2018

tired of watiing. i did the test that i described here and im fixing the tests. will hopefully merge today

@radare radare assigned radare and unassigned rlaemmert Jun 13, 2018
@radare
Copy link
Collaborator Author

radare commented Jun 13, 2018

should be green now, cleaning up printfs. took me 11 minutes..

@radare
Copy link
Collaborator Author

radare commented Jun 13, 2018

@radare radare merged commit bd9611c into master Jun 13, 2018
@Maijin Maijin deleted the more-jmptbl branch July 8, 2018 01:55
@Maijin Maijin restored the more-jmptbl branch July 8, 2018 01:55
@Maijin Maijin deleted the more-jmptbl branch July 8, 2018 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants