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

Use unbounded loops for merkle patricia trie proof verification #39

Merged
merged 18 commits into from
Mar 11, 2024

Conversation

seunlanlege
Copy link
Member

@seunlanlege seunlanlege commented Feb 12, 2024

We previously used a constant MAX_TRIE_DEPTH to place an upper bound how deep we traverse the partial trie (ie proof). This unfortunately is a critical vulnerability as it allows an adversary to craft and insert keys in to onchain tries that are deeply nested beyond this depth thereby allowing the adversary convince our verifier that the key does not exist in the trie. This is because empty values are returned, which signifies a non-membership proof.

@seunlanlege seunlanlege changed the title Use unbounded loops for merkl patricia trie proof verification Use unbounded loops for merkle patricia trie proof verification Feb 12, 2024
@seunlanlege seunlanlege merged commit 5836535 into main Mar 11, 2024
2 checks passed
@seunlanlege seunlanlege deleted the patch-1 branch March 11, 2024 15:23
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