GHSA-g3vv-g2j5-45f2

Suggest an improvement
Source
https://github.com/advisories/GHSA-g3vv-g2j5-45f2
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/04/GHSA-g3vv-g2j5-45f2/GHSA-g3vv-g2j5-45f2.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-g3vv-g2j5-45f2
Aliases
Published
2022-04-08T22:08:45Z
Modified
2023-11-08T04:08:48.701896Z
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
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:

go mod graph | grep go-codec-dagpb

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:

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [
        "CWE-119"
    ],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2022-04-08T22:08:45Z"
}
References

Affected packages

Go / github.com/ipld/go-codec-dagpb

Package

Name
github.com/ipld/go-codec-dagpb
View open source insights on deps.dev
Purl
pkg:golang/github.com/ipld/go-codec-dagpb

Affected ranges

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