Skip to content
DoS Audit finding Intermediate

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.

g Follow with zxriptor

Originally disclosed on Sherlock

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 calls jailValidator(), which returns an error when a validator is already jailed.
GOLANG
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

  1. A validator has no registered keys. It is optional to register keys while the scheme is not activated.
  2. This validator with no keys gets permanently Jailed for double-signing.
  3. The Pubkey module's EndBlock() always returns early, because JailValidators() 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

The original report as published on Sherlock, by g. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

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.

More by g

View all

23 more disclosed reports, best first.

More from SEDA Protocol

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.