Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXYyNGgtcGpqdi1tY3A2
Denial of service in Tendermint
Description
Denial of Service 1
Tendermint 0.33.2 and earlier does not limit the number of P2P connection requests. For each p2p connection, Tendermint allocates XXX bytes. Even though this memory is garbage collected once the connection is terminated (due to duplicate IP or reaching a maximum number of inbound peers), temporary memory spikes can lead to OOM (Out-Of-Memory) exceptions.
Tendermint 0.33.3 (and 0.32.10) limits the total number of P2P incoming connection requests to to p2p.max_num_inbound_peers + len(p2p.unconditional_peer_ids)
.
Notes:
- Tendermint does not rate limit P2P connection requests per IP (an attacker can saturate all the inbound slots);
- Tendermint does not rate limit HTTP(S) requests. If you expose any RPC endpoints to the public, please make sure to put in place some protection (https://www.nginx.com/blog/rate-limiting-nginx/). We may implement this in the future (https://github.com/tendermint/tendermint/issues/1696).
Denial of Service 2
Tendermint 0.33.2 and earlier does not reclaim activeID
of a peer after it's removed in Mempool
reactor. This does not happen all the time. It only happens when a connection fails (for any reason) before the Peer
is created and added to all reactors. RemovePeer
is therefore called before AddPeer
, which leads to always growing memory (activeIDs
map). The activeIDs
map has a maximum size of 65535 and the node will panic if this map reaches the maximum. An attacker can create a lot of connection attempts (exploiting Denial of Service 1), which ultimately will lead to the node panicking.
Tendermint 0.33.3 (and 0.32.10) claims activeID
for a peer in InitPeer
, which is executed before MConnection
is started.
Notes:
InitPeer
function was added to all reactors to combat a similar issue - https://github.com/tendermint/tendermint/issues/3338;- Denial of Service 2 is independent of Denial of Service 1 and can be executed without it.
Specific Go Packages Affected
github.com/tendermint/tendermint/p2p
Impact
- All full nodes (except for validators who are behind closed networks)
- Node's memory usage increases, then it panics either in the mempool or due to OOM.
Patches
- v0.33.3
- v0.32.10
- v0.31.12
Workarounds
No workarounds.
References
- https://hackerone.com/reports/820317 (not disclosed yet)
- https://github.com/tendermint/tendermint/issues/3338
- https://github.com/tendermint/tendermint/issues/1696
For more information
If you have any questions or comments about this advisory:
- Open an issue in tendermint/tendermint
- Email us at [email protected]
More information can be found here.
Credits
- fudongbai for discovering and reporting Denial of Service 2
- Ethan Buchman (@ebuchman) for writing a test case for Denial of Service 2 and Tess Rinearson (@tessr) for fixing it
- Anton Kaliaev (@melekes) for fixing Denial of Service 1
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXYyNGgtcGpqdi1tY3A2
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Low
Classification: General
Published: almost 3 years ago
Updated: 7 months ago
CVSS Score: 3.1
CVSS vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L
Identifiers: GHSA-v24h-pjjv-mcp6, CVE-2020-5303
References:
- https://github.com/tendermint/tendermint/security/advisories/GHSA-v24h-pjjv-mcp6
- https://nvd.nist.gov/vuln/detail/CVE-2020-5303
- https://github.com/tendermint/tendermint/issues/1696
- https://github.com/tendermint/tendermint/issues/3338
- https://github.com/tendermint/tendermint/commit/e2d6859afd7dba4cf97c7f7d412e7d8fc908d1cd
- https://hackerone.com/reports/820317
- https://github.com/tendermint/tendermint/blob/master/CHANGELOG.md#denial-of-service-1
- https://github.com/advisories/GHSA-v24h-pjjv-mcp6
Blast Radius: 10.8
Affected Packages
go:github.com/tendermint/tendermint
Dependent packages: 4,675Dependent repositories: 3,036
Downloads:
Affected Version Ranges: >= 0.32.0, < 0.32.10, < 0.31.12, >= 0.33.0, < 0.33.3
Fixed in: 0.32.10, 0.31.12, 0.33.3
All affected versions: 0.0.0, 0.0.1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.8.0, 0.9.0, 0.9.1, 0.9.2, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.11.0, 0.11.1, 0.12.0, 0.12.1, 0.13.0, 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.17.1, 0.18.0, 0.19.0, 0.19.1, 0.19.2, 0.19.3, 0.19.5, 0.19.6, 0.19.7, 0.19.8, 0.19.9, 0.20.0, 0.21.0, 0.22.0, 0.22.1, 0.22.2, 0.22.3, 0.22.4, 0.22.5, 0.22.6, 0.22.7, 0.22.8, 0.23.0, 0.23.1, 0.24.0, 0.25.0, 0.26.0, 0.26.1, 0.26.2, 0.26.3, 0.26.4, 0.27.0, 0.27.1, 0.27.2, 0.27.3, 0.27.4, 0.28.0, 0.28.1, 0.29.0, 0.29.1, 0.29.2, 0.30.0, 0.30.1, 0.30.2, 0.30.3, 0.30.4, 0.31.0, 0.31.1, 0.31.2, 0.31.3, 0.31.4, 0.31.5, 0.31.6, 0.31.7, 0.31.8, 0.31.9, 0.31.10, 0.31.11, 0.32.0, 0.32.1, 0.32.2, 0.32.3, 0.32.4, 0.32.5, 0.32.6, 0.32.7, 0.32.8, 0.32.9, 0.33.0, 0.33.1, 0.33.2
All unaffected versions: 0.31.12, 0.32.10, 0.32.11, 0.32.12, 0.32.13, 0.32.14, 0.33.3, 0.33.4, 0.33.5, 0.33.6, 0.33.7, 0.33.8, 0.33.9, 0.34.0, 0.34.1, 0.34.2, 0.34.3, 0.34.4, 0.34.5, 0.34.6, 0.34.7, 0.34.8, 0.34.9, 0.34.10, 0.34.11, 0.34.12, 0.34.13, 0.34.14, 0.34.15, 0.34.16, 0.34.17, 0.34.18, 0.34.19, 0.34.20, 0.34.21, 0.34.22, 0.34.23, 0.34.24, 0.35.0, 0.35.1, 0.35.2, 0.35.3, 0.35.4, 0.35.5, 0.35.6, 0.35.7, 0.35.8, 0.35.9