Lucene search

K
githubGitHub Advisory DatabaseGHSA-V24H-PJJV-MCP6
HistoryMay 27, 2021 - 6:44 p.m.

Denial of service in Tendermint

2021-05-2718:44:09
CWE-787
CWE-789
GitHub Advisory Database
github.com
53

4.3 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

PARTIAL

AV:N/AC:M/Au:N/C:N/I:N/A:P

3.7 Low

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

LOW

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L

0.001 Low

EPSS

Percentile

51.1%

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:

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

For more information

If you have any questions or comments about this advisory:

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

Affected configurations

Vulners
Node
tenderminttendermintRange<0.32.10
OR
tenderminttendermintRange<0.31.12
OR
tenderminttendermintRange<0.33.3

4.3 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

PARTIAL

AV:N/AC:M/Au:N/C:N/I:N/A:P

3.7 Low

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

LOW

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L

0.001 Low

EPSS

Percentile

51.1%

Related for GHSA-V24H-PJJV-MCP6