High, CVSS 7.5GoPublished
ipld/go-codec-dagpb panics when processing certain blocks
CVE-2022-2584 · GHSA-g3vv-g2j5-45f2
- Affected
- Go github.com/ipld/go-codec-dagpb < 1.3.1
- Fixed in
- 1.3.1· Vendor fix available
- Issue
- 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 Open an issue in go-codec-dagpb
Recommended action: Upgrade to 1.3.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.