Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Enforce limits on the size of inbound messages/requests in P2P #3335

Closed
jondubois opened this issue Feb 4, 2019 · 1 comment
Closed

Enforce limits on the size of inbound messages/requests in P2P #3335

jondubois opened this issue Feb 4, 2019 · 1 comment
Assignees
Milestone

Comments

@jondubois
Copy link
Contributor

Expected behavior

Messages and requests which are too large should be rejected to prevent DoS against nodes. Ideally, this value should be configurable.

This is particularly important when dealing with peer info. Right now there is no limit as to how big the custom options object in P2PDiscoveredPeerInfo can be; so peers could just spam us with lots of data inside the options object to fill up our memory (since we keep a list of P2PDiscoveredPeerInfo).

Actual behavior

There is no size limit on messages and requests.

@jondubois jondubois self-assigned this Feb 4, 2019
@jondubois jondubois changed the title Enforce limits on the new custom options field in P2P Enforce limits on the size of inbound messages/requests in P2P Feb 4, 2019
@jondubois jondubois assigned ishantiw and unassigned jondubois Feb 21, 2019
@shuse2 shuse2 transferred this issue from LiskArchive/lisk-elements Apr 15, 2019
@diego-G diego-G self-assigned this Jul 4, 2019
shuse2 added a commit that referenced this issue Jul 8, 2019
Set websocket maxPayload on P2P library - Closes #3335
@diego-G
Copy link

diego-G commented Jul 22, 2019

Solution does not work after merge development into last state of 2.3 version.

@diego-G diego-G reopened this Jul 22, 2019
diego-G added a commit that referenced this issue Jul 22, 2019
@jondubois jondubois assigned jondubois and unassigned diego-G Jul 22, 2019
@sridharmeganathan sridharmeganathan added this to the Sprint 3 milestone Jul 24, 2019
jondubois added a commit that referenced this issue Jul 25, 2019
Enforce limits on the size of inbound messages/requests in P2P - Closes #3335
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants