Skip to content

Conversation

@Tristan-Wilson
Copy link
Member

The Solidity executeValidatePreimage function was missing validations present in the equivalent Rust ValidateCertificate opcode handler.

  • Add check for preimageType > 255, setting ERRORED status
  • Add check for preimageType 4-255, returning 0 without memory access
  • Add ptr validation using isValidLeaf() before memory proof
  • Reorder operations to validate preimageType before memory access

The Solidity executeValidatePreimage function was missing validations
present in the equivalent Rust ValidateCertificate opcode handler.

- Add check for preimageType > 255, setting ERRORED status
- Add check for preimageType 4-255, returning 0 without memory access
- Add ptr validation using isValidLeaf() before memory proof
- Reorder operations to validate preimageType before memory access
@sherlock-ai-beta
Copy link

Sherlock AI

Thank you for using Sherlock AI!

**Security Review Unavailable**: Your account doesn't have an active subscription.     To enable automated security reviews on your pull requests, please visit     [https://ai.sherlock.xyz](https://ai.sherlock.xyz) to set up your subscription.

Once activated, Sherlock AI will automatically analyze your code changes and provide     detailed security findings directly in your pull requests.

Need help? Reach out to us at [contact@sherlock.xyz](mailto:contact@sherlock.xyz).

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.

3 participants