Vulnerability Report: GO-2022-0963
- CVE-2022-36078, GHSA-4p6f-m4f9-ch88
- Affects: github.com/gagliardetto/binary
- Published: Sep 02, 2022
- Modified: Jun 12, 2023
A memory allocation vulnerability can be exploited to allocate arbitrarily large slices, which can exhaust available memory or crash the program. When parsing data from untrusted sources of input (e.g. the blockchain), the length of the slice to allocate is read directly from the data itself without any checks, which could lead to an allocation of excessive memory.
For detailed information about this vulnerability, visit https://github.com/gagliardetto/binary/security/advisories/GHSA-4p6f-m4f9-ch88.
Affected Packages
-
PathVersionsSymbols
-
before v0.7.1
26 affected symbols
- BaseVariant.UnmarshalBinaryVariant
- BinByteCount
- BorshByteCount
- CompactU16ByteCount
- Decoder.Decode
- Decoder.Discard
- Decoder.ReadInt64
- Decoder.ReadNBytes
- Decoder.ReadRustString
- Decoder.ReadTypeID
- Decoder.ReadUint64
- Encoder.Encode
- Encoder.WriteFloat32
- Encoder.WriteFloat64
- Int64.UnmarshalWithDecoder
- JSONFloat64.MarshalWithEncoder
- MarshalBin
- MarshalBorsh
- MarshalCompactU16
- MustBinByteCount
- MustBorshByteCount
- MustCompactU16ByteCount
- Uint64.UnmarshalWithDecoder
- UnmarshalBin
- UnmarshalBorsh
- UnmarshalCompactU16
Aliases
References
- https://github.com/gagliardetto/binary/security/advisories/GHSA-4p6f-m4f9-ch88
- https://github.com/gagliardetto/binary/pull/7
- https://github.com/gagliardetto/binary/releases/tag/v0.7.1
- https://vuln.go.dev/ID/GO-2022-0963.json
Feedback
See anything missing or incorrect?
Suggest an edit to this report.