Chain can deadlock due to no consensus because New Validators can not submit vote extensions
New validators cannot submit vote extensions because they lack an entry in the previous validator tree, and if their combined voting power exceeds one third of the total, the chain cannot reach consensus on vote extensions, causing a halt.
Source: https://github.com/sherlock-audit/2024-12-seda-protocol-judging/issues/243
The protocol has acknowledged this issue.
Found by
g
Summary
New validators will increase the total voting power, but their vote on vote extensions will not be counted for 1 block.
A validator's vote must be counted for the current block if they have an entry in a previous batch. When the following condition is true:
SumOfNewValidatorsPower > 1/3 TotalVotingPower
PrepareProposal() and ProcessProposal() will always fail when validating vote extensions and cause a chain halt.
Root Cause
In abci/handlers.go#ExtendVoteHandler():101, a new Validator will not be able to submit their vote extension because they do not yet have an entry in a previous batch.
// Check if the validator was in the previous validator tree.
// If not, it means the validator just joined the active set,
// so it should start signing from the next batch.
_, err = h.batchingKeeper.GetValidatorTreeEntry(ctx, batch.BatchNumber-1, h.signer.GetValAddress())
This check is also enforced in VerifyVoteExtensionHandler(), where a vote extension must be submitted
by a validator with an entry in a previous batch.
Internal Pre-conditions
- The total power of New Validators is greater than 1/3.
External Pre-conditions
None
Attack Path
- All the vote extensions of New Validators are not submitted, which makes up for more than 1/3 of total voting power.
- When the proposal is Prepared or Processed,
ValidateVoteExtensions() will always fail because it requires consensus on vote extensions.
Impact
Chain halt because consensus will always fail on vote extensions no matter the proposer.
PoC
None
Mitigation
Consider modifying ValidateVoteExtensions() and filtering out the New Validators from being counted for TotalVotingPower.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the vote extension handler rejects votes from validators that do not have an entry in the previous batch's validator tree, so new validators cannot contribute their voting power to the consensus required for vote extensions.
Impact
The chain could halt because consensus on vote extensions will always fail when new validators' power exceeds one third of the total.
What the attacker needed
New validators' total power > 1/3 of total
The fix
The protocol should be modified to filter out new validators from the total voting power calculation in ValidateVoteExtensions.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In some blockchain systems, validators (the computers that approve blocks) must include extra votes called vote extensions. This report found that newly added validators are not allowed to submit these votes for one block. If enough new validators join at once, their missing votes can prevent the network from agreeing, and the whole chain stops.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.