A jailed validator with no registered key blocks proving scheme activation
A validator without a registered key that is already jailed causes the Pubkey module's EndBlock to fail when trying to jail it again, so the proving scheme never activates. This can prevent batches from being produced.
Source: https://github.com/sherlock-audit/2024-12-seda-protocol-judging/issues/239
Found by
g, zxriptor
Summary
When a proving scheme is ready for activation, all validators without registered keys will be jailed. However, there is no check
that a validator is currently jailed before jailing, which raises an error and causes the EndBlock() to return early without
activating the proving scheme.
Root Cause
- In Pubkey module's
EndBlock(), a validator without keys will get jailed without first checking if it is already jailed. slashingKeeper.Jail()eventually callsjailValidator(), which returns an error when a validator is already jailed.
if validator.Jailed {
return types.ErrValidatorJailed.Wrapf("cannot jail already jailed validator, validator: %v", validator)
}
Internal Pre-conditions
None
External Pre-conditions
None
Attack Path
- A validator has no registered keys. It is optional to register keys while the scheme is not activated.
- This validator with no keys gets permanently Jailed for double-signing.
- The Pubkey module's
EndBlock()always returns early, becauseJailValidators()always fails.
Impact
The Proving Scheme will not be activated at the configured activation height and will remain inactive while the validator is jailed and has no registered key. A validator can be jailed permanently, leading to the Proving Scheme never getting activated.
A validator can prevent batches from ever getting produced because the SEDAKeyIndexSecp256k1 proving scheme never gets activated.
PoC
None
Mitigation
Consider checking first if the Validator is Jailed before jailing it.
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/sedaprotocol/seda-chain/pull/522
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
Impact
The proving scheme will not activate at the configured height and may never activate, which could prevent batches from being produced.
What the attacker needed
A validator without registered keys; that validator is jailed for double-signing
The fix
The code should check whether a validator is already jailed before attempting to jail it.
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.
A blockchain validator is a computer that helps run the network. If a validator misbehaves, it can be 'jailed', meaning it is temporarily stopped from taking part. This report says that when the system tries to jail a validator that is already jailed, it crashes and stops a planned upgrade from happening.
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.