Advisory

GHSA-q264-w97q-q778

Also known as: CVE-2023-23625, GO-2023-1557

Summary

Denial of service via HAMT Decoding Panics

Details

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 bogus fanout parameter in the HAMT directory nodes.
This include checks returned in ipfs/go-bitfield 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-unixfs/commit/dbcc43ec3e2db0d01e8d80c55040bba3cf22cb4b

Workarounds
Do not feed untrusted user data to the decoding functions.

References

  • https://github.com/ipfs/go-bitfield/security/advisories/GHSA-2h6c-j3gf-xp9r

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2023-02-10 23:08 UTC
Modified
2026-09-10 03:49 UTC

Affected packages and fixes

github.com/ipfs/go-unixfs

Go · All systems

Affected

  • introduced 0, fixed 0.4.3 (semver)

Fixed versions

0.4.3

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences