Rock Paper Scissors

First Flight #38
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Valid

Malicious actor can close any game

Summary

The timeoutReveal function can be called before the second commit is made

Vulnerability Details

In commitMove(), the game.revealDeadline is only set once both players have made their commits. Until then, the revealDeadline is unset and either player can call timeoutReveal, causing the game to cancel.

Impact

Any malicious user can join a game where the game creator has not yet made a commit, make a commit, and call timeoutReveal to cancel the game.

Tools Used

N/A

Recommendations

Set revealDeadline during the game creation to be a default time far into the future which prevent a pre-emptive call to timeoutReveal. The revealDealine will get reset to the correct value once both commits are made.

Updates

Appeal created

m3dython Lead Judge 2 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Absence of State Change on Join Allows Player B Hijacking

Game state remains Created after a player joins

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.