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

Investigate memory leaks in the C code #21

Closed
nabla-c0d3 opened this issue Dec 2, 2017 · 2 comments
Closed

Investigate memory leaks in the C code #21

nabla-c0d3 opened this issue Dec 2, 2017 · 2 comments

Comments

@nabla-c0d3
Copy link
Owner

See nabla-c0d3/sslyze#196

@nabla-c0d3
Copy link
Owner Author

The last commit fixes a huge memory leak where nassl was leaking an OpenSSL BIO on almost every connection.

In a simple script that runs 3 scan commands 20 times (https://gist.github.com/nabla-c0d3/fc633194f7a8509a7e68c931f1fbc471), memory usage at the end of the script went from 126856 kb to 50404 kb.
The memory was also relatively stable but was still increasing slightly on each of the 20 iterations. From my analysis, the biggest remaining leaks (which are much smaller than the big one I just fixed) are in OpenSSL 1.0.1e, mainly in SSL_do_handshake(); not much I can do about this.

This blog post helped me a lot, especially the section about umdh : https://benbernardblog.com/tracking-down-a-freaky-python-memory-leak/#usingumdhtosearchforcbasedmemoryleaks

@nabla-c0d3
Copy link
Owner Author

The fixes have been released as part of nassl 1.0.2.

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

No branches or pull requests

1 participant