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

V1.1.0 bone #2

Merged
merged 6 commits into from
Nov 29, 2024
Merged

V1.1.0 bone #2

merged 6 commits into from
Nov 29, 2024

Conversation

nikashib
Copy link

Changes found:

Changes:

  • Updated MerklePatriciaProof file to fix MTP issue
  • Removed use of RLP reader in Rootchain contract
  • Removed use of RLP reader in WithdrawManager contract
  • Removed use of RLP reader in SlashingManager contract
  • Removed draining from validatorShare and stakeManager
  • Updated the deployment script and added validatorShare and StakeManager updates

MPT Issue
The key security issue here relates to the Merkle Patricia Trie node encoding specification:

  1. In MPT, nodes with 2 elements can be either leaf nodes or extension nodes
  2. Their prefix nibbles distinguish them:
    • Leaf nodes must have prefix 2 or 3
    • Extension nodes must have prefix 0 or 1

The vulnerability in the original code is that it doesn't validate these prefixes, which means:

  1. An attacker could craft a proof where an extension node is treated as a leaf node or vice versa
  2. This could lead to invalid proofs being accepted as valid, potentially allowing proof forgery

@yannmart yannmart self-requested a review November 29, 2024 19:08
@yannmart yannmart merged commit 4e21007 into v1.0.0-bone Nov 29, 2024
1 check failed
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