Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2023-23631: Add size check on the bitfield before allocation · ipfs/go-unixfsnode@91b3d39

github.com/ipfs/go-unixfsnode is an ADL IPLD prime node that wraps go-codec-dagpb’s implementation of protobuf to enable pathing. In versions priot to 1.5.2 trying to read malformed HAMT sharded directories can cause panics and virtual memory leaks. If you are reading untrusted user input, an attacker can then trigger a panic. This is caused by bogus fanout parameter in the HAMT directory nodes. Users are advised to upgrade. There are no known workarounds for this vulnerability.

CVE
#vulnerability#git

@@ -88,10 +88,16 @@ func maxPadLength(nd data.UnixFSData) int { return len(fmt.Sprintf("%X", nd.FieldFanout().Must().Int()-1)) }
func bitField(nd data.UnixFSData) bitfield.Bitfield { bf := bitfield.NewBitfield(int(nd.FieldFanout().Must().Int())) const maximumHamtWidth = 1 << 10
func bitField(nd data.UnixFSData) (bitfield.Bitfield, error) { fanout := int(nd.FieldFanout().Must().Int()) if fanout > maximumHamtWidth { return nil, fmt.Errorf("hamt witdh (%d) exceed maximum allowed (%d)", fanout, maximumHamtWidth) } bf := bitfield.NewBitfield(fanout) bf.SetBytes(nd.FieldData().Must().Bytes()) return bf return bf, nil }
func checkLogTwo(v int) error {

Related news

GHSA-4gj3-6r43-3wfc: IPFS go-unixfsnode subject to DOS via HAMT Decoding Panics

## Impact Trying to read malformed HAMT sharded directories can cause panics and virtual memory leaks. If you are reading untrusted user input, an attacker can then trigger a panic. This is caused by a bogus fanout parameter in the HAMT directory nodes. This includes checks returned in [ipfs/go-bitfield GHSA-2h6c-j3gf-xp9r](https://github.com/ipfs/go-bitfield/security/advisories/GHSA-2h6c-j3gf-xp9r), as well as limiting the fanout to <= 1024 (to avoid attempts of arbitrary sized allocations). ## Patches - https://github.com/ipfs/go-unixfsnode/commit/91b3d39d33ef0cd2aff2c95d50b2329350944b68 - https://github.com/ipfs/go-unixfsnode/commit/a4ed723727e0bdc2277158337c2fc0d82802d122 ## References * https://github.com/ipfs/go-unixfs/security/advisories/GHSA-q264-w97q-q778 * https://github.com/ipfs/go-bitfield/security/advisories/GHSA-2h6c-j3gf-xp9r

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907