GO-2023-1558

Source
https://pkg.go.dev/vuln/GO-2023-1558
Import Source
https://vuln.go.dev/ID/GO-2023-1558.json
JSON Data
https://api.test.osv.dev/v1/vulns/GO-2023-1558
Aliases
Published
2023-02-14T19:41:21Z
Modified
2024-05-20T16:03:47Z
Summary
Denial of service via malformed size parameters in github.com/ipfs/go-bitfield
Details

When feeding untrusted user input into the size parameter of NewBitfield and FromBytes functions, an attacker can trigger panics.

This happens when the size is a not a multiple of 8 or is negative.

A workaround is to ensure size%8 == 0 && size >= 0 yourself before calling NewBitfield or FromBytes.

Database specific
{
    "review_status": "REVIEWED",
    "url": "https://pkg.go.dev/vuln/GO-2023-1558"
}
References
Credits
    • Jorropo

Affected packages

Go / github.com/ipfs/go-bitfield

Package

Name
github.com/ipfs/go-bitfield
View open source insights on deps.dev
Purl
pkg:golang/github.com/ipfs/go-bitfield

Affected ranges

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

Ecosystem specific

{
    "imports": [
        {
            "path": "github.com/ipfs/go-bitfield",
            "symbols": [
                "FromBytes",
                "NewBitfield"
            ]
        }
    ]
}