Skip to content

security: mitigate BatchSign DoS with limits and deduplication#32

Open
EFCCWEB3 wants to merge 1 commit into0gfoundation:mainfrom
EFCCWEB3:fix/batch-sign-dos-limit
Open

security: mitigate BatchSign DoS with limits and deduplication#32
EFCCWEB3 wants to merge 1 commit into0gfoundation:mainfrom
EFCCWEB3:fix/batch-sign-dos-limit

Conversation

@EFCCWEB3
Copy link

@EFCCWEB3 EFCCWEB3 commented Mar 5, 2026

Description

This PR addresses a resource exhaustion vulnerability in the batch_sign RPC endpoint.

Fixes

  • Batch Size Limit: Implements a MAX_BATCH_SIZE of 100 to prevent massive gRPC messages from overwhelming the node with expensive KZG verifications.
  • Request Deduplication: Uses a HashSet to ensure each storage_root in a batch is unique, preventing an attacker from using a single on-chain upload to trigger redundant CPU-heavy operations.

Closes #31

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.

batch_sign Resource Exhaustion

2 participants