The function PuppyRaffle#refund()
reset the address of the player refunded.
If two players get refunded, any subsequent call to the function PuppyRaffle#enterRaffle()
will revert caused by the check on the duplicates and no new players will enter the raffle.
The following line in PuppyRaffle#enterRaffle()
is checking for equality but it is not taking address 0 into account.
Having more than one address 0 in the players
array is caused by the PuppyRaffle#refund()
function at this particular line.
A proof of concept of the attack is provided below.
The previous situation can be caused either by a malicious user who requests a refund with 2 of his addresses or simply by two different players.
Manual review.
In the PuppyRaffle#enterRaffle()
function make sure to take in consideration the address 0 when you are searching for duplicates.
Funds are locked to no one. If someone gets the refund issue, they also got this issue. IMPACT: High Likelihood: High
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.