github.com/tendermint/tendermint
Affected
- introduced
0.33.0, fixed0.33.3(semver)
Fixed versions
0.33.3
Fix
- Fixed version
0.33.3go get github.com/tendermint/[email protected]
Advisory
Also known as: CVE-2020-5303
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:
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;Specific Go Packages Affected
github.com/tendermint/tendermint/p2p
Impact
Patches
Workarounds
No workarounds.
References
For more information
If you have any questions or comments about this advisory:
More information can be found here.
Credits
Low Basis: The source's own band: LOW
0.33.0, fixed 0.33.3 (semver)0.33.3
0.33.3go get github.com/tendermint/[email protected]0, fixed 0.31.12 (semver)0.31.12
0.31.12go get github.com/tendermint/[email protected]0.32.0, fixed 0.32.10 (semver)0.32.10
0.32.10go get github.com/tendermint/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0