Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

DOS unbounded persistant memory leak

Moderate
Jorropo published GHSA-q3j6-22wf-3jh9 May 10, 2023

Package

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

Affected versions

< v0.12.0

Patched versions

v0.12.0

Description

This package has been moved to github.com/ipfs/boxo/bitswap, this vulnerability is tracked there: 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 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.

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

CVE-2023-25568

Credits