Skip to content
DoS Audit finding Intermediate

Attackers can flood validators with Commit/Reveal execution messages to delay blocks or DOS the node

Commit and Reveal execution messages are not charged gas fees, and an attacker can fill a transaction with many identical such messages to consume validator resources without cost. This could delay blocks or halt the chain.

g Follow with tallo

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2024-12-seda-protocol-judging/issues/246

Found by

g, tallo

Summary

Commit and Reveal execution messages sent to the SEDA Core Contract are not charged any gas fees. This provides a way for malicious actors to DOS nodes or at the least delay blocks.

Root Cause

Before a transaction is executed, the AnteHandler is run. It checks if all of the transactions' messages is eligible for free gas and sets gas price to 0 when they are.

A message is eligible for free gas when it is a CommitDataResult or a RevealDataResult, and the executor can commit or reveal.

GOLANG
  switch contractMsg := contractMsg.(type) {
  case CommitDataResult:
    result, err := d.queryContract(ctx, coreContract, CanExecutorCommitQuery{CanExecutorCommit: contractMsg})
    if err != nil {
      return false
    }

    return result
  case RevealDataResult:
    result, err := d.queryContract(ctx, coreContract, CanExecutorRevealQuery{CanExecutorReveal: contractMsg})
    if err != nil {
      return false
    }

    return result

A malicious user can abuse this unmetered execution by filling a transaction with the same CommitDataResult or RevealDataResult message.

Internal Pre-conditions

None

External Pre-conditions

None

Attack Path

  1. Attacker sends a Transaction filled with the same CommitDataResult message for a data request that is ready for commitment.
  2. Since the attacker's transaction passes checkFreeGas() for all its messages, the transaction will be eligible for free gas.

Multiple attackers can repeat this attack to exploit unmetered execution and unnecessarily consume validator resources.

Impact

This can cause chain delays or chain halts.

PoC

None

Mitigation

Consider checking that the transaction does not contain duplicate messages before making it eligible for free gas. Another option is to charge gas up front and provide a refund mechanism instead.

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/sedaprotocol/seda-chain/pull/527

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

This can cause chain delays or chain halts.

What the attacker needed

None

The fix

The protocol team fixed this issue by checking for duplicate messages before granting free gas or by charging gas upfront with a refund mechanism.

How it was found

  1. Attacker sends a transaction filled with the same CommitDataResult message for a data request ready for commitment.
  2. The transaction passes the free gas check for all its messages and is eligible for free gas.

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 charges a small fee (gas) for each action to prevent spam. Here, certain actions were free, and an attacker could pack many copies of the same free action into one transaction, making the network do a lot of work for nothing. This could slow down or stop the chain.

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.