Details
Chunking bypass. Emit k blocks each declaring n / k elements, with n / k below any plausible per-block threshold but n itself well into the GB range. Pre-fix, the decoder happily grows the map block-by-block until the OS kills the process. Post-fix with MaxMapAllocSize = 10_000, the decoder rejects whichever block-header read pushes cumulative count past 10,000.
Either shape can be produced by hand-crafting the wire bytes; no iskorotkov/avro writer is needed to generate them.
References
- Fix PR: iskorotkov/avro#5
- Fix commit: `5192df9` (
codec_map.go,config.go, tests) - Slice-path chunking-attack test coverage added in the same PR: `534c7518`
- Release: `v2.33.0`
- Security policy: `SECURITY.md`
- Related advisories on this fork: `GHSA-mc57-h6j3-3hmv` (integer overflow), `GHSA-w8j3-pq8g-8m7w` (CPU exhaustion — the same chunked-payload shape may trigger both before allocation pressure kicks in)
- Cross-module precedent on
hamba/avro: `GO-2023-1930` /CVE-2023-37475/GHSA-9x44-9pgq-cf45 - Upstream (read-only): `hamba/avro`
Credits
- Fix author (commit
5192df9, PR #5 —MaxMapAllocSizeconfig field, cumulative enforcement in both map decoders, chunking-attack tests for slices and maps): Ivan Korotkov (@iskorotkov) - Review (commit
a5fbddcb, "address review comments"): Daniel Błażewicz (@klajok)
Timeline
- 2026-04-30 —
MaxMapAllocSizeintroduced (5192df9); chunking-attack test coverage for slices added (534c7518). - 2026-05-01 — PR #5 merged into
main. - 2026-05-06 —
v2.33.0tagged and released. - 2026-05-07 — Advisory published.
- 2026-05-15 — Advisory revised.