-
Notifications
You must be signed in to change notification settings - Fork 252
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
Regression: 'Too Many Files Open' in MITM component #265
Comments
There's a good chance that the RDPDR stuff is part of the issue, but it looks like it's possible to reproduce this behaviour without any file transfers or mapped drives, so I doubt that's all there is to it. |
I'll repro the "too many files open" stack trace with a scanner. Then test if @xshill's fix takes care of that for simple cases at least. We should plug the leaks but I don't think we should lose too much time trying to survive 10,000 concurrent connections. |
Tested with Googling for nmap and stress testing I stumbled upon: https://www.rapid7.com/db/modules/auxiliary/dos/tcp/synflood/. Using this doesn't negatively affects PyRDP on current master branch. The SYN connections don't even trigger logging. For file transfers, @yraiesets did whole directory transfers stress tests with and without executables in them and nothing wrong happened. I think the file mapping changes and the linked issues fixed this. I'm closing this. Let's open a new ticket if we have a clear reproducer. |
It looks like #48 has croppped up again in the MITM component. We should spend some time figuring out how to trace open handles.
A good way to reproduce quickly seems to be to do a SYN flood on the PyRDP instance. (Maybe try masscan or write a simple asyncio flooder in Python)
We'd need to investigate how to debug file descriptor leaks and determine if this is a leak or just denial of service.
Off the top of my head, the source of leak/exhaustion might be:
One successful RDP connection would generate:
The reason these numbers are doubled is because of the initial certificate request which causes a disconnect
Things to check:
The text was updated successfully, but these errors were encountered: