-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Silently concretizing and symbolic input via s2ecmd #391
Comments
Hi! Thanks for the report.
[1] http://s2e.systems/docs/Plugins/Linux/FunctionModels.html |
Hi again and thank you for your answer so far. I see why that may be necessary as it should then create symbolic data again afterwards, right? However using this the result is that it will go through much more possible paths that are unnecessary (i.e. /). So I wanted to debug it with gdb and I also rebuilt S2E with the --debug flag and started it in gdb, but whenever I run it inside gdb I get the following problem that I don't get when I run it outside of gdb:
Do you have an idea why I would get that? PS: How would I attach a project, exporting it will be in .tar.xz format but apparently that's not supported to be uploaded here. |
Regarding silent concretization, a stack trace would help. |
To attach tar.xz, just make it a tar.xz.zip |
Hi everyone,
I am currently trying to retrieve information about the system calls a particular binary (and its associated libraries) are invoking. I am currently currently starting the program with the
S2E_SYM_ARGS
variable inbootstrap.sh
and this works fine in some cases. If I for example startls
with the following line:S2E_SYM_ARGS="1" LD_PRELOAD="${S2E_SO}" ./${TARGET} -a > /dev/null 2> /dev/null
it does what I expect and the TestCaseGenerator shows me all options for ls that consist of 1 dash and 1 letter. However when I increase the size of the input that shall be symbolized from 2 bytes to something longer then it will create all kinds of combinations for option flags which are all unique, but will contain i.e. (for 4 bytes) -sf<each other 1 letter flag> and also -sd<each other 1 letter flag> and that for each combination of flags so it really explodes very fast (quite unthinkable to doe it with 11 bytes to get something like the--full-time
flag). I noticed that there is a lot of silently concretizing during that execution (much more than on 2 bytes) and I figured that might be the reason, that it concretizes the symbolic bytes too early so it does not collect info about the path constraints and will then traverse the same code many times (with also earlier concretized input). The reasons for that are always eithermemory access to concrete code
oraccess to " + regName + " register from libcpu helper
.That connects to the other topic of this questions: symbolic values with
symbwrite
. It would be great for my project to be able to take symbolic input via stdin and from the documentation this should work withsymbwrite
. However in the same scenario (ls $(./s2ecmd symbwrite 2)
) so 2 symbolic bytes this does not generate all the options flags which I would expect, but rather only creates the pairs (0x0, 0x0) and (0x0, 0x1) and then terminates. Checking the log again I see that right after inserting the symbolic input there are messages of concretization:I don't quite understand why that happens. I would understand concretization right before writing the output of ls so it can display 'real' values, but during that execution I don't quite understand why that happens so often.
This to me also looks like the simplest examples (like in the documentation described at: http://s2e.systems/docs/Tutorials/BasicLinuxSymbex/s2e.so.html#what-about-other-symbolic-input) does not work as expected, or am I missing something here?
I have been battling with those problems for some time now and would greatly appreciate if you can provide me some help.
If you need some further information, just let me know.
Thanks in advance!
The text was updated successfully, but these errors were encountered: