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

Add protection against spam handshake floods #229

Open
njgheorghita opened this issue Nov 24, 2020 · 1 comment
Open

Add protection against spam handshake floods #229

njgheorghita opened this issue Nov 24, 2020 · 1 comment

Comments

@njgheorghita
Copy link
Contributor

The other thing that I think we're going to run into is that someone can probably force us to flush our sessions by initiating lots and lots of handshakes in quick succession. It won't crash the app but it will require us to re-establish sessions which costs something. We can probably mitigate this (in some other PR) by simply limiting the number of incomplete handshakes for a given Endpoint so that executing such an attack requires many IP addresses which makes the attack more expensive.

From #209

@pipermerriam
Copy link
Member

Probably good to maybe have two session stores, one for in-progress handshakes and one for completed ones. That ensures that we don't evict valid sessions just to make room for a maybe new session. This modification would likely take place in the ddht.v5_1.pool.Pool

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

2 participants