Advisory

GHSA-g3vv-g2j5-45f2

Also known as: CVE-2022-2584, GHSA-967g-cjx4-h7j6, GO-2022-0422

Summary

ipld/go-codec-dagpb panics when processing certain blocks

Details

Impact
Decoding certain blocks using the go-ipld-prime version of the dag-pb codec (go-codec-dagpb) can cause a panic. The panic comes from an assumption that the reported link length is accurate, but if the block ends before that reported length then it’s a buffer overread.

Patches
The issue is fixed in v1.3.1 and above.

Consumers can discover the versions of go-codec-dagpb in a module's dependency graph using the following command in the module root:


### Workarounds
You can work around this issue without upgrading by recovering panics higher in the call stack of the goroutine that calls the defective code.

### For more information
If you have any questions or comments about this advisory:

* Ask in [IPFS Discord #ipld-chatter](https://discord.gg/ipfs)
* Open an issue in [go-codec-dagpb](https://github.com/ipld/go-codec-dagpb)

Severity

High Basis: The source's own band: HIGH

Dates

Published
2022-04-08 22:08 UTC
Modified
2026-02-03 03:08 UTC

Affected packages and fixes

github.com/ipld/go-codec-dagpb

Go · All systems

Affected

  • introduced 0, fixed 1.3.1 (semver)

Fixed versions

1.3.1

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences