Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Set max entries for VerifyProof in statePlugin #3675

Merged
merged 4 commits into from
Jan 17, 2025
Merged

Conversation

shargon
Copy link
Member

@shargon shargon commented Jan 16, 2025

Description

Verify should have a maximum number of entries, otherwise ulong.MaxValue is taken, this could produce a DoS.

Type of change

  • Optimization (the change is only an optimization)
  • Style (the change is only a code style for better maintenance or standard purpose)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Not required

Test Configuration:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@shargon shargon added the Bug Used to tag confirmed bugs label Jan 16, 2025
@shargon shargon changed the title [Fix] statePlugin [Fix] max entries for VerifyProof in statePlugin Jan 16, 2025
@shargon shargon changed the title [Fix] max entries for VerifyProof in statePlugin [Fix] Set max entries for VerifyProof in statePlugin Jan 16, 2025
@shargon shargon added Waiting for Review Easy-to-Review a simple edit; just a few lines labels Jan 16, 2025
Copy link
Contributor

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likely byte.MaxValue is enough. It depends on the tree height in reality, right?

@shargon shargon merged commit 15d3553 into master Jan 17, 2025
7 checks passed
@shargon shargon deleted the fix-state branch January 17, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Used to tag confirmed bugs Easy-to-Review a simple edit; just a few lines Waiting for Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants