PT-2023-19086 · Unknown · Go-Bitfield
Jorropo
·
Published
2023-02-09
·
Updated
2023-02-17
·
CVE-2023-23626
CVSS v3.1
5.9
Medium
| Vector | AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
Name of the Vulnerable Software and Affected Versions
go-bitfield (affected versions not specified)
Description
The issue arises when untrusted user input is fed into the size parameter of
NewBitfield and FromBytes functions, allowing an attacker to trigger panics. This occurs when the size is not a multiple of 8 or is negative. Although there was a note in the NewBitfield documentation, it was incomplete and missing from FromBytes's documentation. The problem has been addressed by returning an error if the size is incorrect.Recommendations
To resolve the issue, users are advised to upgrade to a version where the
NewBitfield and FromBytes functions return an error if the size is not a multiple of 8 or is negative.
For users unable to upgrade, ensure that size is a multiple of 8 and not negative before calling NewBitfield or FromBytes.
As a temporary workaround, consider checking the condition size%8 == 0 && size >= 0 yourself before calling NewBitfield or FromBytes.Exploit
Fix
Improper Check for Exceptional Conditions
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Go-Bitfield