Skip to content
This repository has been archived by the owner on Nov 14, 2017. It is now read-only.

Segmention Fault on ARM binaries #46

Open
barp opened this issue Jun 19, 2015 · 1 comment
Open

Segmention Fault on ARM binaries #46

barp opened this issue Jun 19, 2015 · 1 comment

Comments

@barp
Copy link

barp commented Jun 19, 2015

running RopTool with the following arguments
RopTool -f -a arm -c scripts/arm/call_reg.lua
causes Segmentation fault on the latest revision 82081f4
on any ARM binaries i tried to run on (android device libc for example)

@gaasedelen
Copy link
Contributor

Hello barp, just a forewarning - the ARM side of things have not been tested as extensively as the x86 and AMD64 side of things so there is bound to be issues. The LibVEX trunk was also very recently updated from a 2012 build to a more modern one, so there's pieces of CodeReason that will need to be revised accordingly too.

It appears this segfault in particular was happening in VEX, specifically under the ITxxx optimisation analysis step in vexTRUNK/priv/guest_arm_toIR.c. For whatever reason it was attempting to deference the PC we were trying to translate as a valid pointer. I guess this is VEX making some assumptions it maybe shouldn't be. Reading the comments on the section seems to imply that it's okay to simply #if 0 it out as it is ignored in some cases anyway.

With that, I noticed there's some new statement tags in the VEX IR that need to be implemented in CodeReason's statementBuilder. I'll be making a separate issue for that shortly.

This probably won't fix ARM functionality in its entirety, but should resolve the immediate segfaults.

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

No branches or pull requests

2 participants