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

Rea - Improper input validation on updateSequencerSetMaxSize() #226

Open
sherlock-admin2 opened this issue Sep 23, 2024 · 0 comments
Open

Comments

@sherlock-admin2
Copy link
Contributor

sherlock-admin2 commented Sep 23, 2024

Rea

Medium

Improper input validation on updateSequencerSetMaxSize()

Summary

The updateSequencerSetMaxSize() function does not check for extreme values for the new sequencer set size.

Line of code

https://github.com/sherlock-audit/2024-08-morphl2/blob/main/morph/contracts/contracts/l2/staking/L2Staking.sol#L221

Root Cause

The updateSequencerSetMaxSize() function lacks input validation, allowing a malicious actor to set the sequencer set size to extreme values disrupting protocol operations

Internal pre-conditions

  1. The owner must call updateSequencerSetMaxSize() with a arbitrary value
  2. There is no upper or lower bound for the sequencer set size, enabling values like 0 to 1,000

External pre-conditions

The attacker must either control the owner account or be able to influence the governance mechanism that controls this function

Attack Path

  1. The attacker, controlling the owner account, calls updateSequencerSetMaxSize() with a value of 0, halting sequencer operations
  2. Alternatively, the attacker sets the value to 1,000, drastically increasing the number of sequencers and reducing efficiency

Impact

  • If value is set to 0, the protocol halts, leading to a complete loss of transaction processing ability. Potential loss: $500,000 in transaction fees and staking rewards over a week
  • If the value is set too high, transaction confirmation times increase due to inefficiency, causing user frustration and eventual exit from platform

PoC

No response

Mitigation

Introduce input validation with reasonable bounds for the sequencer set size, e.g., between 10 and 100, to prevent extreme values

@sherlock-admin3 sherlock-admin3 changed the title Kind Coconut Crane - Improper input validation on updateSequencerSetMaxSize() Rea - Improper input validation on updateSequencerSetMaxSize() Oct 16, 2024
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

No branches or pull requests

1 participant