Closed bannsec closed 7 years ago
Some notes here from our discussion in irc.
You will need to call remove_preconstraints()
on the missed path, since we preconstrain the input to be what was given initially.
There was a bug on the linux side where we didn't add preconstraints correctly. This is fixed by https://github.com/angr/tracer/commit/58f2dfd9e50a29f0813802529f8411c6eaa91722
Tracer currently limits the size of the input to what was given with this line size=len(self.input))}
It might make sense to allow it to be optional
Awesome. Gonna close this. Two follow-ups I see, one would be adding an example of using tracer (i could submit something, just not sure where to yet), 2 would be agree that size should be optional. I'll open up an issue to track this. Likely should be a strait forward change once all my angr bits start working again!
Thanks!
It appears that the constraints are not being added when passed to the SimProcedures or something. I have the following C code:
The idea here is to test that tracer will notice the missed branch if I give it, say an input of "2". It does notice the missed branch, but the constraints are messed up. Here's a quick python example:
Notice that the constraints on this state stdin needs to be "\n", which will obviously never pass the integer check.
Attached is the binary itself:
a.zip