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 Maximum Message Length Check To PeerProtocolCodec #94

Closed
GGist opened this issue Jul 9, 2017 · 2 comments
Closed

Add Maximum Message Length Check To PeerProtocolCodec #94

GGist opened this issue Jul 9, 2017 · 2 comments

Comments

@GGist
Copy link
Owner

GGist commented Jul 9, 2017

Currently any peers would be able to drain the client machine of memory by sending a message with a large payload (this would only affect variable length message fields).

We should add a max message length to PeerProtocolCodec so that when the codec checks the number of bytes that the message will use, it can kill the connection and propagate an appropriate error (one that clients can identify and filter the peer in the Handshaker).

@GGist GGist added the bip_peer label Jul 9, 2017
@GGist GGist added this to the bip_peer Pre-Release milestone Jul 9, 2017
@GGist
Copy link
Owner Author

GGist commented Jul 9, 2017

Not sure if we want to also support the notion of a maximum block size (that validation would probably happen at the PeerWireProtocol layer), or if we want to rely on this global length check for that as well. It could also be something we explore in the future.

@GGist
Copy link
Owner Author

GGist commented Jul 10, 2017

Separated block size checks out to separate issue #96

@GGist GGist closed this as completed Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant