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

Environment variables symbolic forking #449

Closed
offlinemark opened this issue Aug 11, 2017 · 1 comment
Closed

Environment variables symbolic forking #449

offlinemark opened this issue Aug 11, 2017 · 1 comment
Labels
hackathon Good issues to work on during a hackathon help wanted idea needs_review

Comments

@offlinemark
Copy link
Contributor

Currently, when an analyzed program calls getenv(), Manticore executes this concretely, always returning a concrete pointer or NULL back to the application. If an application calls getenv and branches based on the return value (to check for NULL), we will always explore one path or the other, but never both, so there is an opportunity here to increase the coverage of an analysis. Manticore can instrument getenv, and possibly

  • fork state, one which returns a NULL, another which returns some constant, predefined, concrete string (e.g. "1"). this may seem a little odd, but applications often use env variables as booleans and don't care about the contents, so this will allow us to explore both paths when the return value is checked for NULL. there are of course issues with this approach if the application actually does care about the contents of the env variable: the env variable will be malformed, and the application may reject it and simply error out.
  • fork state, one which returns a NULL, another which returns a symbolic buffer. this more complete symbolic execution, and will cause exploration of the code that handles/parses the environment variable itself.
@yan yan added help wanted hackathon Good issues to work on during a hackathon labels Sep 12, 2018
@ehennenfent ehennenfent added this to the Validate Existing issues milestone Jan 23, 2019
@ehennenfent ehennenfent removed this from the Validate Existing issues milestone Feb 26, 2019
@ehennenfent
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hackathon Good issues to work on during a hackathon help wanted idea needs_review
Projects
None yet
Development

No branches or pull requests

3 participants