Skip to content

fix(dyn-abi): avoid nested zero-sized array allocation - #1142

Merged
DaniPopes merged 3 commits into
alloy-rs:mainfrom
0xalpharush:fix/dyn-abi-nested-zst-dos
Jul 3, 2026
Merged

DaniPopes merged 3 commits into
alloy-rs:mainfrom
0xalpharush:fix/dyn-abi-nested-zst-dos

Conversation

@0xalpharush

@0xalpharush 0xalpharush commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Avoid allocating attacker-controlled lengths for nested dynamic zero-sized ABI arrays.
  • Add a parser-reachable regression for (uint256,()[]), upgraded to 0xffffffff after the fix.

Tests

  • cargo test -p alloy-dyn-abi

@0xalpharush
0xalpharush force-pushed the fix/dyn-abi-nested-zst-dos branch 2 times, most recently from 86c88c1 to 53c6ac0 Compare July 3, 2026 14:47
@0xalpharush
0xalpharush force-pushed the fix/dyn-abi-nested-zst-dos branch from 53c6ac0 to c6a67cc Compare July 3, 2026 14:53
@0xalpharush
0xalpharush marked this pull request as ready for review July 3, 2026 14:58
@github-project-automation github-project-automation Bot moved this to Reviewed in Alloy Jul 3, 2026
@DaniPopes DaniPopes changed the title fix(dyn-abi): avoid nested zero-sized array allocation fix(dyn-abi): avoid nested zero-sized array allocation Jul 3, 2026
@DaniPopes
DaniPopes enabled auto-merge (squash) July 3, 2026 19:04
@DaniPopes
DaniPopes merged commit c133daf into alloy-rs:main Jul 3, 2026
31 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewed to Done in Alloy Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants