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

Manticore leaves lots of files in /tmp #568

Closed
offlinemark opened this issue Nov 14, 2017 · 2 comments
Closed

Manticore leaves lots of files in /tmp #568

offlinemark opened this issue Nov 14, 2017 · 2 comments

Comments

@offlinemark
Copy link
Contributor

When the analyzed program called open and the first byte of the filename is symbolic, Manticore creates a /tmp file, fills it with 64 '+' and uses that as the backing file.

  • Could manticore clean up after itself? this can probably be done using tempfile.TemporaryFile rather than tempfile.mkstemp in linux.py:SLinux.sys_open
  • Does manticore need to have a file on disk at all? could the symbolic file exist only in memory?
@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
@MrSynAckSter-zz
Copy link

I changed mkstmp to tempfile.TemporaryFile in 221f149. I ran it against all of the tests in /tests/native, and there didn't seem to be errors. My only concern is that if tempfile.TemporaryFile is ever garbage collected, the file cease to exist. I don't know enough about how Manticore handles these files to say whether or not that possible, but running it against a few random binaries that use sys_open doesn't seem to cause any issues of that nature. If you guys can suggest anything else to do in order to ensure this change is safe, let me know.

@ehennenfent
Copy link
Contributor

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

No branches or pull requests

4 participants