PuppyRaffle misbehaves when we call enterRaffle with zero addresses into the newPlayers array. Since it passes the very first require statement, it adds zero new players into the players array. However, when it goes to sanitize the players array, it eventually gets stuck in a loop hell but not infinite. As we're using Solidity version 7 in PuppyRaffle, there is no exception for underflow and overflow.
Our machines have to run that for loop 115792089237316195423570985008687907853269984665640564039457584007913129639935x times 😂.... and i don't know how many months it will take to complete only just for testing 😂.
It depends on blockchain whether blockchain makes an exit from a prolong for loop by crashing the raffle or completes for loop's all iterations.
In the end there's no gain only loss for all actors.... adversary, participant, raffle owner, anybody else who calls enterRaffle with an empty address array and 0 value.
Manual Review
We can employ a require check to restrict enterRaffle call with empty address array and 0 value.
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.