You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Linux master 6.3.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 30 May 2023 13:44:01 +0000 x86_64 GNU/Linux Brave Browser 114.1.52.117
Subsystem:
CircuitRelayV2
Severity:
Low
Description:
When configuring 'reservations' on the CircuitRelayServer, there is a very easy landmine to hit. Setting the 'defaultDataLimit' to any number will cause all relay connections to start failing. This is caused because the configuration value is passed directly through to 'countStreamBytes' with no validation. https://github.com/libp2p/js-libp2p/blob/master/packages/libp2p/src/circuit-relay/utils.ts#L14
While the operation will throw a TypeError due to the mixed types, it will not be seen because of the way countStreamBytes used in a pipeline submitted to queueMicroTask.
Steps to reproduce the error:
create a CircuitRelayServer service
configure 'reservations.defaultDataLimit' to any number (eg. 131072)
observe CircuitRelay connections will be setup but fail to upgrade
The text was updated successfully, but these errors were encountered:
Version:
0.45.9
Platform:
Linux master 6.3.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 30 May 2023 13:44:01 +0000 x86_64 GNU/Linux
Brave Browser 114.1.52.117
Subsystem:
CircuitRelayV2
Severity:
Low
Description:
When configuring 'reservations' on the CircuitRelayServer, there is a very easy landmine to hit. Setting the 'defaultDataLimit' to any number will cause all relay connections to start failing. This is caused because the configuration value is passed directly through to 'countStreamBytes' with no validation.
https://github.com/libp2p/js-libp2p/blob/master/packages/libp2p/src/circuit-relay/utils.ts#L14
While the operation will throw a TypeError due to the mixed types, it will not be seen because of the way countStreamBytes used in a pipeline submitted to queueMicroTask.
Steps to reproduce the error:
The text was updated successfully, but these errors were encountered: