Note: At the judges request, this downgraded issue from the same warden has been included in this report for completeness.
Due to the permissionless game creation in OPfaultproof, multiple games can be created at the same L1 timestamp asserting different l2 block number states. The only checks in the game creation flow is the l2 block is later than the latest anchor state (last confirmed) and no duplicated state creation.
OPFaultVerifier::_getGameTime is vulnerable and doesnt ensure a proper relationship with L2 block sequence. And allow proofs for a future state relative to the fetched context to be accepted and returned.
When _minAgeSec is set to 0. The context only fetches resolved games. And since there is only one canonical chain of resolved games. This is not vulnerable.
Vulnerable case: when _minAgeSec 0, there could be multiple branches of games ongoing. OPFaultVerifier::_getGameTime is based on game-created time and doesnt correlate with the l2 block number of the state assertion, neither does it indicate the likelihood of correctness.
https://github.com/code-423n4/2024-12-unruggable/blob/9e0e908a207f088dd843fcdc3e4de5fa0edd6c5c/contracts/op/OPFaultVerifier.sol#L93
Flows:
OpFaultVerifier::getStorageValues -> _checkWindow -> _getGameTime
In _checkWindow, the proofs game creation time (_getGameTime(gameProxy)) will be checked against the contexts game creation time (_getGameTime(gameProxy1)). Due to the game creation time doesnt reflect L2 block sequence, this check is invalid a game created at an earlier timestamp might represent a later blockchain state (l2 block number).
https://github.com/code-423n4/2024-12-unruggable/blob/9e0e908a207f088dd843fcdc3e4de5fa0edd6c5c/contracts/op/OPFaultVerifier.sol#L83
getStorageValues may actually allow proof stating a later blockchain state than context. A user/client requesting value or account with context that correspond to L2 block X, might actually receive answers based on block Y > X.
In OPFaultVerifier::_getGameTime, when _minAgeSec  0, consider using g.l2BlockNumber().
OPFaultVerifier.sol#L93
raffy (Unruggable) disputed and commented:
Picodes (judge) decreased severity to Low and commented:
oakcobalt (warden) commented:
raffy (Unruggable) commented:
oakcobalt (warden) commented:
Picodes (judge) commented:
