diff --git a/bin/wasm-node/CHANGELOG.md b/bin/wasm-node/CHANGELOG.md index fe625826ab..7d2d3e8276 100644 --- a/bin/wasm-node/CHANGELOG.md +++ b/bin/wasm-node/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Fixed + +- Increase the threshold after which smoldot considers that a protocol name sent through multistream-select is an attempt at a DoS attack, to accomodate for the change in the GrandPa protocol name in Substrate. ([#2162](https://github.com/paritytech/smoldot/pull/2162)) + ## 0.6.6 - 2022-03-18 ### Added diff --git a/src/libp2p/connection/multistream_select.rs b/src/libp2p/connection/multistream_select.rs index 3bba32000d..bbc39ee1a5 100644 --- a/src/libp2p/connection/multistream_select.rs +++ b/src/libp2p/connection/multistream_select.rs @@ -169,7 +169,7 @@ where // legitimately requests a protocol that the listener doesn't support. In order to prevent // confusion, a minimum length is applied to the protocol name length. Any protocol name // smaller than this will never trigger a protocol error, even if it isn't supported. - const MIN_PROTO_LEN_NO_ERR: usize = 48; + const MIN_PROTO_LEN_NO_ERR: usize = 512; let max_frame_len = cmp::max( cmp::max(max_proto_name_len, MIN_PROTO_LEN_NO_ERR), HANDSHAKE.len(),