Closed howlbot-integration[bot] closed 4 months ago
This is invalid because, the op-program execution in the VM will prove that the posted output root is invalid (valid output roots never have rawBlockNumber.length > 32
). The derivation process it runs will stop when the L1 head is reached and the claimed output root does not match the current safe head. So the honest actor can just play out the dispute game to invalidate the proposal rather than calling challengeRootL2Block.
The challengeRootL2Block function is only required to invalidate outputs in the case where the valid output root of the safe head is posted but with a future L2Block number claimed.
zobront marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2024-07-optimism/blob/main/packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol#L516
Vulnerability details
Impact
Malicious Game creator can cause
challengeRootL2Block
to revert, which would prevent challenging the L2 block of games with obviously invalid values.Proof of Concept
Have a look at FaultDisputeGame#challengeRootL2Block function:
The function reverts if
rawBlockNumber.length>32
. This allows the game creator to create games, inputting rootClaims whose block number cannot be challenged.rootClaim is an hash of _outputRootProof _outputRootProof.latestBlockHash is an hash of _headerRLP _headerRLP is parsed into an array, then read to get the rawBlockNumber(which is at the 8th position in the array)
When constructing the root claim, malicious user can
hashOutputRootProof
the _outputRootProof to get the rootClaim.Tools Used
Manual Review
Recommended Mitigation Steps
The sanity check for the block number string length should be done during game creation, not in the challengeRootL2Block function.
Assessed type
Invalid Validation