Skip to content

DOS bitswap unbounded persistant memory leak

Moderate
Jorropo published GHSA-qvqg-6rp8-4p9h May 10, 2023

Package

gomod github.com/ipfs/go-ipfs (Go)

Affected versions

All

Patched versions

None
gomod github.com/ipfs/kubo (Go)
< v0.19.0
v0.19.0

Description

Impact

An attacker is able allocate arbitrarily many bytes in the Bitswap server by sending many WANT_BLOCK and or WANT_HAVE requests which are queued in an unbounded queue, with allocations that persist even if the connection is closed.

This affects users accepting or connecting untrusted connections such as by running in the public swarm and no pnet config.
Nodes that are not publicly reachable but connects to untrusted nodes are also vulnerable to the untrusted nodes being connected to since libp2p connections are blindly bidirectional.

Patches

Workarounds

Use PNET, swarm filters or resource manager allows list to block untrusted connections.

Note that using the resource manager will disrupt both client and server features because the bitswap protocol is a message based protocol mixing requests and responses.

References

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

CVE ID

No known CVE

Weaknesses

Credits