Aleo prover/network DOS vector due to invalid `split` proofs being free to abuse
Single split transactions do not require a fee commitment, so an attacker can submit invalid proofs without losing funds. This lets them waste provers' CPU cycles and potentially slow or stop block production.
Source: https://github.com/sherlock-audit/2024-05-aleo-judging/issues/34
Found by
dtheo
Summary
Split transactions that contain only 1 transition (the entire transaction is a single split transaction and nothing else) do not require a fee commitment. This allows for a malicious entity to grieve provers by forcing them to attempt and verify invalid proofs with no monetary loss. This can be used by competing provers to DOS their competition and waste CPU cycles that would otherwise be used towards the "mining/proving" the next block. A malicious actor attack multiple provers can significantly slow or stop aleo blocks from being created.
Vulnerability Detail
Aleo has fee, deploy and execute transaction types. If a deploy or an execute transaction type is broadcasted with an invalid proof or if the finalize fails then their corresponding fee transaction will be consumed instead. This is a DOS prevention feature that Aleo uses to prevent the network from having to verify proofs without some amount of collateral fee on the side.
Single split transactions, when called by users directly, are a special case where the there is no fee commitment required. Aleo attempts to charge the fee directly in the split function by burning it. The issue is that if there is not sufficient funds to pay the fee and the proof fails then their is no backup fee commitment to seize. This opens up the Aleo network to a DOS vector that that is nearly free to abuse.
An attacker must only pay the initial fees to make a large number of private records with at least 1 microcredit each. As long as they only use each credit once per block , they can reuse the records to to make invalid proofs that will pass all of the transaction prechecks in check_fee, check_transaction, etc. until the proof verification is attempted and CPU cycles are wasted.
Impact
This can be used to DOS Aleo provers by other provers competing to solve the Aleo Coinbase Puzzle (and gain rewards). If a malicious entity attacked all provers at the same time the Aleo network would stop producing blocks during this time.
Code Snippet
snarkVM/synthesizer/src/vm/verify.rs#L225-L248
snarkVM/synthesizer/program/src/resources/credits.aleo#L947-L972)
Tool used
Manual Review
Recommendation
Require a fee commitment outside of the split transaction than can be verified quickly in the transaction precheck/speculation flow.
Discussion
sammy-tm
@evanmarshall
Can you tell us your thoughts about this issue?
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 split transaction type lacks a fee commitment that can be seized if the proof is invalid, unlike other transaction types.
Impact
This could allow a malicious entity to DOS Aleo provers, and if all provers are attacked simultaneously, the network could stop producing blocks.
What the attacker needed
Ability to submit transactions to Aleo; funds to create many private records
The fix
Require a fee commitment outside of the split transaction that can be verified quickly during prechecks.
How it was found
- Create many private records each containing at least one microcredit by paying the initial fees.
- Use each record only once per block to submit invalid split proofs that pass prechecks but fail proof verification.
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 networks, users pay a fee to have their transactions processed. Here, a special type of transaction (a split) can be sent without that fee. An attacker can send many invalid versions of these transactions, forcing computers that verify transactions to do useless work, which can slow down the whole network.
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.