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

Incoming Connection Handling Needs to be Fixed #11

Open
ajvpot opened this issue May 12, 2013 · 7 comments
Open

Incoming Connection Handling Needs to be Fixed #11

ajvpot opened this issue May 12, 2013 · 7 comments

Comments

@ajvpot
Copy link

ajvpot commented May 12, 2013

The current socket listen loop doesn't send the data off to a thread until it receives data. If you open a socket to the Bloocoin server and don't send any data, it blocks the main thread indefinitely. This creates a very simple DoS vulnerability.

@JosephRedfern
Copy link

It might be possible to use the SocketServer Python Module to fix this fairly easily.

@f-prime
Copy link
Member

f-prime commented May 13, 2013

Ahh, this is why there is this random down time.

@sysr-q
Copy link
Contributor

sysr-q commented May 13, 2013

You should move to an async lib like gevent or Twisted if you feel serious about it.
Whilst those are reasonably larger dependencies, they'd make it fucking easy as shit to run.

@JosephRedfern
Copy link

@Plausibility - agreed, we need something more "robust". My commit was just meant to be a quick fix.

@sysr-q
Copy link
Contributor

sysr-q commented May 13, 2013

@JosephRedfern: It wouldn't be a small update, you'd probably be rewriting a significant amount of core code - the only bit which would stay reasonably similar would be how your commands are dispatched to classes.
@Max00355 is the guy to ask for all things rewrite-y.

@JosephRedfern
Copy link

@Plausibility - I was suggesting that #12 is a quick fix, with your suggestion of gevent/Twisted being something more long-term.

@sysr-q
Copy link
Contributor

sysr-q commented May 13, 2013

Definitely worth looking into, since as demonstrated, a non-closed socket can hang the entire operation.

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

Successfully merging a pull request may close this issue.

4 participants