CVE-2023-25568 Boxo bitswap/server: DOS unbounded persistent memory leak
An attacker can cause a persistent memory leak in the Boxo Bitswap server, leading to denial of service for applications accepting untrusted connections.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-25568?
CVE-2023-25568 is a high-severity denial of service vulnerability in ipfs boxo, published on 10 May 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Boxo, formerly known as go-libipfs, is a library for building IPFS applications and implementations. In versions 0.4.0 and 0.5.0, if an attacker is able allocate arbitrary many bytes in the Bitswap server, those allocations are lasting even if the connection is closed. This affects users accepting untrusted connections with the Bitswap server and also affects users using the old API stubs at `github.com/ipfs/go-libipfs/bitswap` because users then transitively import `github.com/ipfs/go-libipfs/bitswap/server`. Boxo versions 0.6.0 and 0.4.1 contain a patch for this issue. As a workaround, those who are using the stub object at `github.com/ipfs/go-libipfs/bitswap` not taking advantage of the features provided by the server can refactor their code to use the new split API that will allow them to run in a client only mode: `github.com/ipfs/go-libipfs/bitswap/client`.
Which versions are affected by CVE-2023-25568?
8 open source packages ship an affected version, including github.com/ipfs/go-libipfs and github.com/ipfs/go-bitswap. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/ipfs/go-libipfs Go | All versions | 0.4.1, 0.6.0 |
github.com/ipfs/go-libipfs Go | All versions | 0.4.1 |
github.com/ipfs/go-libipfs Go | All versions | 0.4.1 |
github.com/ipfs/go-libipfs Go | From 0.5.0 | 0.6.0 |
github.com/ipfs/go-libipfs Go | From 0.5.0 | 0.6.0 |
github.com/ipfs/go-bitswap Go | All versions | 0.12.0 |
2 more packages
github.com/ipfs/go-bitswap Go | All versions | 0.12.0 |
github.com/ipfs/go-bitswap Go | All versions | 0.12.0 |
Products include Protocol Boxo.
How do I fix CVE-2023-25568?
Upgrade github.com/ipfs/go-libipfs to a fixed version for your release line: 0.4.1 or 0.6.0.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2023-25568 being exploited?
There is no known exploitation of CVE-2023-25568 in the wild and no public exploit code.
Sources
Also known as GHSA-m974-xj4j-7qv5, GHSA-q3j6-22wf-3jh9, GO-2023-1766.