GHSA-q3j6-22wf-3jh9

Suggest an improvement
Source
https://github.com/advisories/GHSA-q3j6-22wf-3jh9
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/05/GHSA-q3j6-22wf-3jh9/GHSA-q3j6-22wf-3jh9.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-q3j6-22wf-3jh9
Aliases
Published
2023-05-11T20:39:55Z
Modified
2023-11-08T04:11:52.109563Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
github.com/ipfs/go-bitswap vulnerable to DOS unbounded persistent memory leak
Details

This package has been moved to github.com/ipfs/boxo/bitswap, this vulnerability is tracked there: https://github.com/ipfs/boxo/security/advisories/GHSA-m974-xj4j-7qv5 (CVE-2023-25568)

Remediation

This is a two step process: 1. Apply one of: - (recommended) upgrade from github.com/ipfs/go-bitswap to github.com/ipfs/boxo/bitswap. - If you are still using github.com/ipfs/go-bitswap and cannot upgrade to boxo, you can upgrade to github.com/ipfs/go-bitswap@v0.12.0, this will replace the go-bitswap implementation by stubs which points to boxo. 2. Open https://github.com/ipfs/boxo/security/advisories/GHSA-m974-xj4j-7qv5 and then follow boxo's remediation section.

Vulnerable symbols

  • >= v0.9.0; < v0.12.0
    • github.com/ipfs/go-bitswap/server/internal/decision.(*Engine).MessageReceived
    • github.com/ipfs/go-bitswap/server/internal/decision.(*Engine).NotifyNewBlocks
    • github.com/ipfs/go-bitswap/server/internal/decision.(*Engine).findOrCreate
    • github.com/ipfs/go-bitswap/server/internal/decision.(*Engine).PeerConnected
  • v0.8.0
    • github.com/ipfs/go-bitswap/internal/decision.(*Engine).MessageReceived
    • github.com/ipfs/go-bitswap/internal/decision.(*Engine).NotifyNewBlocks
    • github.com/ipfs/go-bitswap/internal/decision.(*Engine).findOrCreate
    • github.com/ipfs/go-bitswap/internal/decision.(*Engine).PeerConnected
  • < v0.8.0
    • github.com/ipfs/go-bitswap/internal/decision.(*Engine).MessageReceived
    • github.com/ipfs/go-bitswap/internal/decision.(*Engine).receiveBlocksFrom
    • github.com/ipfs/go-bitswap/internal/decision.(*Engine).findOrCreate
    • github.com/ipfs/go-bitswap/internal/decision.(*Engine).PeerConnected

Workarounds

If you are using the stubs at github.com/ipfs/go-bitswap and not taking advantage of the features provided by the server, refactoring your code to use the new split API will allows you to run in a client-only mode using: github.com/ipfs/go-bitswap/client.

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

Affected packages

Go / github.com/ipfs/go-bitswap

Package

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

Affected ranges

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