Skip to content

Conversation

@MikaHirano
Copy link

This PR fixes a security vulnerability in the validateMPTProof function where the for loop could complete without hitting any return statement, causing undefined behavior or potential DoS attacks.

Changes:

  • Added explicit revert() statement after the for loop in validateMPTProof function
  • Includes descriptive error message: "Invalid proof: incomplete traversal"
  • Ensures function always returns or reverts explicitly

Function now explicitly reverts with clear error message if proof traversal is incomplete, ensuring predictable behavior and preventing potential DoS

- Add revert statement after for loop to handle incomplete traversal edge case
- Prevents undefined behavior when proof validation completes without explicit return

The function now explicitly reverts with a clear error message if proof
traversal is incomplete.
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.

1 participant