ADVISORIES

Go Vulnerability Database

GO-2023-1558

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.

Affected packages

EcosystemPackageAffected versions
Gogithub.com/ipfs/go-bitfield
All versions before 1.1.0 (fixed in 1.1.0)

References