Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Valid

Incorrect Time check for Dussehra::killRavana()

Summary

According to the documentation, the selected ram should only be able to kill ravana after 12 October 2024 and before 13 October 2024. This translates to the timestamp 1728687600 for 12 October 2024 and 1728774000 for 13 October 2024. Which means it should be greater than 1728687600 and less than 1728774000 but the killRavana function uses block.timestamp > 1728777669 and block.timestamp < 1728691069. This means that the ram can only kill ravana after Sat Oct 12 2024 00:57:49 GMT+0100 and before Sun Oct 13 2024 01:01:09. This means the ram can actually kill ravana after 13 October 2024 and cannot kill ravana till after Sat Oct 12 2024 00:57:49.

Vulnerability Details

Function Affected: killRavana

Issue: Incorrect timestamp boundaries for the allowed timeframe.

Severity: High. The designated timeframe is critical for maintaining the event's integrity, and the incorrect timestamps could result in significant deviations from the expected behavior.

POC

The test below fails even thought it was called after october 12

function test_killRavana1() public participants {
vm.warp(1728688200); // 2024-10-12 00:10
vm.startPrank(organiser);
choosingRam.selectRamIfNotSelected();
vm.stopPrank();
vm.startPrank(player2);
dussehra.killRavana(); // It fails
vm.stopPrank();
}

Impact

Functional Integrity: The Ram may not be able to kill Ravana during the intended period, disrupting the event's expected flow and fairness.

Tools Used

Manual Review

Recommendations

Update the killRavana function to use the correct timestamp boundaries, ensuring the action is allowed only between 1728691200 and 1728777600.

Updates

Lead Judging Commences

bube Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Incorrect timestamp

Support

FAQs

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