code-423n4 / 2024-05-arbitrum-foundation-findings

1 stars 2 forks source link

An invalid assertion can get confirmed, even when there are honest participants #28

Closed howlbot-integration[bot] closed 1 month ago

howlbot-integration[bot] commented 1 month ago

Lines of code

https://github.com/code-423n4/2024-05-arbitrum-foundation/blob/main/src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L826-L830 https://github.com/code-423n4/2024-05-arbitrum-foundation/blob/main/src/challengeV2/libraries/EdgeChallengeManagerLib.sol#L529

Vulnerability details

Impact

Even though an assertion is invalid, adversary can make it get confirmed just because some states within it were valid. Note that even though an honest party later proves the state that was invalid, it would be irrelevant cos the adversay block edge level has been confirmed, and timer set to max uint64.

Proof of Concept

Normally, if there are two rival assertions, it is expected that the honest participant would bisect his edge to the exact point where he disagrees with the adversary, and then oneStepProve that executing a step on the prevState(which everyone agrees on), would yield the state that he claimed.

Once honest participant does that, he can then:

But the issue is, Adversary can create an invalid assertion and bisect it to a point where it was valid, and perform the steps outlined above.

For example,

Tools Used

Manual Review

Recommended Mitigation Steps

onestepProving an edge should not immediately allow the parent block edge to be confirmable, as the bigger picture may be invalid. Only those that were able to oneStepProve all the singleStepEdges as requested by other rivals after the confirmationThresholdBlocks should be allowed to updateTimerCacheByClaim, and confirmEdgeByTime.

Assessed type

Context

gzeoneth commented 1 month ago

Invalid. It is not possible to bisect where two parties agree. In the protocol these are just the same edge - only rivals can be bisected. It is possible to create additional assertion that bisect to arbitrary point, but winning 1 OSP does not mean confirmation immediately since timer is min(upperChild,lowerChild). The attacker still need to accumulate time in the other edge and would give honest validator enough time to bisect properly.

c4-judge commented 1 month ago

Picodes marked the issue as unsatisfactory: Invalid