Skip to content

Comments

L-08: Validate calldata length and offsets in decodeOrderData#25

Merged
mgretzke merged 3 commits intov1-audit1from
fix/l08-validate-decodeorderdata
Dec 9, 2025
Merged

L-08: Validate calldata length and offsets in decodeOrderData#25
mgretzke merged 3 commits intov1-audit1from
fix/l08-validate-decodeorderdata

Conversation

@ccashwell
Copy link
Member

Summary

  • Adds explicit length and offset bounds checks in ERC7683AllocatorLib.decodeOrderData(bytes) to prevent malformed/incomplete calldata from causing unexpected behavior.
  • Enforces a minimum size and verifies nested order pointer stays within orderData.

Tests added

  • Gasless path: openFor reverts on short orderData.
  • On-chain path: open reverts on short orderData.

Rationale

Calldata is untrusted; ensuring sufficient length and safe offsets avoids decoding panics and strengthens input validation.

…rderData (L-08)

Add explicit minimum length and offset bounds checks before decoding orderData to prevent malformed calldata from causing unexpected behavior. Includes tests for gasless openFor and onchain open reverting on truncated orderData.
@ccashwell ccashwell requested a review from a team as a code owner September 11, 2025 13:45
@mgretzke mgretzke merged commit 8b35b67 into v1-audit1 Dec 9, 2025
4 checks passed
@mgretzke mgretzke deleted the fix/l08-validate-decodeorderdata branch December 9, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants