GHSA-qvqg-6rp8-4p9h

Suggest an improvement
Source
https://github.com/advisories/GHSA-qvqg-6rp8-4p9h
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/05/GHSA-qvqg-6rp8-4p9h/GHSA-qvqg-6rp8-4p9h.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-qvqg-6rp8-4p9h
Published
2023-05-11T20:40:16Z
Modified
2023-05-11T20:40:16Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L CVSS Calculator
Summary
github.com/ipfs/kubo affected by DOS Bitswap unbounded persistent memory leak
Details

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

  • 19feb15833c6f4d6e7f1e1b132efaae96d76481d boxo update in Kubo
  • GHSA-m974-xj4j-7qv5 patches in boxo

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

Database specific
{
    "cwe_ids":  [
        "CWE-400",
        "CWE-770"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2023-05-11T20:40:16Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

Go / github.com/ipfs/kubo

Package

Name
github.com/ipfs/kubo
View open source insights on deps.dev
Purl
pkg:golang/github.com/ipfs/kubo

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.19.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/05/GHSA-qvqg-6rp8-4p9h/GHSA-qvqg-6rp8-4p9h.json"