Closed sherlock-admin4 closed 7 months ago
We believe this to be a valid issue that would be out of scope of this contest because it pertains to the FaultDisputeGame resolution logic (see "Please list any known issues/acceptable risks that should not result in a valid finding" section in the Q&A). However, because we've noted some ambiguity in the intended phrasing of the Q&A, we would like to reward this report outside of this contest. We are currently coordinating to determine reward amounts and which platform will be used to distribute the reward.
Based on scope details below, any issue related to FDG/FDG subgames resolution logic will be considered OOS of this contest if airgap and/or delayed WETH mechanism implemented for off-chain review of game results and bond distribution is not shown to be bypassed
https://docs.google.com/document/d/1xjvPwAzD2Zxtx8-P6UE69TuoBwtZPbpwf5zBHAvBJBw/edit
isn't there also a cost of 10000*bond that hasn't been included in the calcs? won't that make this pretty much unfeasible?
Escalate
The bug does not fall outside the scope rules, let's take a look at the Optimism verdict:
FaultDisputeGame resolution logic is not included in the scope of this contest. Participants should assume that the FaultDisputeGame can resolve incorrectly (i.e.g, can resolve to DEFENDER_WINS when it should resolve to CHALLENGER_WINS or vice versa). Reports that demonstrate an incorrect resolution of the FaultDisputeGame are appreciated but will not be considered valid rewardable findings for this specific contest.
The bug does not show an incorrect resolution of the game - it shows a permanent freezing / broken resolution of the game. In fact it will never be able to reach a CHALLENGER_WINS / DEFENDER_WINS scenario. The security guardrails operate under the assumption that a game IS eventually resolvable, and aim to secure incorrect resolution through blacklisting and admin takeover of bad claims. When a game is NOT resolvable, there's a whole new set of challenges that the Optimism team is faced with, whilst honest users cannot claim their bonds back.
Escalate
The bug does not fall outside the scope rules, let's take a look at the Optimism verdict:
FaultDisputeGame resolution logic is not included in the scope of this contest. Participants should assume that the FaultDisputeGame can resolve incorrectly (i.e.g, can resolve to DEFENDER_WINS when it should resolve to CHALLENGER_WINS or vice versa). Reports that demonstrate an incorrect resolution of the FaultDisputeGame are appreciated but will not be considered valid rewardable findings for this specific contest.
The bug does not show an incorrect resolution of the game - it shows a permanent freezing / broken resolution of the game. In fact it will never be able to reach a CHALLENGER_WINS / DEFENDER_WINS scenario. The security guardrails operate under the assumption that a game IS eventually resolvable, and aim to secure incorrect resolution through blacklisting and admin takeover of bad claims. When a game is NOT resolvable, there's a whole new set of challenges that the Optimism team is faced with, whilst honest users cannot claim their bonds back.
You've created a valid escalation!
To remove the escalation from consideration: Delete your comment.
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
Based on the agreed upon scope details and the line drawn, I believe this is still invalid based on comments here.
Issues with a root cause in the game that ARE handled by the safeguards are OUT OF SCOPE (note that this includes subgame resolution issues and theft of bonds, as both of these issues stem from the game that was assumed to be insecure, so are only valid if they are able to escape the safeguards).
attack/defend/move
) within FaultDisputeGame contract (although requires a huge amount of funds given bonds needs to be committed) leading to claims not being able to be resolved from high gas consumptions exceeding block gas limitPlanning to reject escalation and keep issue as is
Result: Invalid Has Duplicates
The protocol team fixed this issue in the following PRs/commits: https://github.com/ethereum-optimism/optimism/pull/10248
haxatron
medium
Bricking dispute game resolutions through creation of many subgames
Summary
Bricking dispute game resolutions through creation of many subgames
Vulnerability Detail
It is possible to brick the dispute game resolution through the creation of many subgames rooted at a single challenge index. The problem is that there is no limit to the number of subgames per challenge index that can be created in the
move()
function. Note that a check for the claim hash exists, BUT the claim hash is different if the_claim
passed is different, and therefore an attacker can create an unlimited number of subgames.FaultDisputeGame.sol#L226-L318
When this occurs, it is not possible to resolve the subgames, as we have to delete the
subgames
array which results in multiple SSTORE operations, and doing so would exceed the block gas limit. FaultDisputeGame.sol#L405-L477The following PoC shows that it is possible to create 10000 subgames to exceed the block gas limit:
However, 10000 games would require 200 gwei 400,000 10000 = 800 ETH and therefore doing so would be expensive.
Impact
Bricking dispute game resolutions through creation of many subgames
Code Snippet
https://github.com/sherlock-audit/2024-02-optimism-2024/blob/main/optimism/packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol#L226-L318
Tool used
Manual Review / Foundry
Recommendation
Add a reasonable limit to the number of subgames that can be rooted on a single challenge index.