Beatland Festival

First Flight #44
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

Missing Zero Address Check in `FestivalPass::setOrganizer`

Impact

Setting organizer = address(0) causes all functions restricted by the onlyOrganizer modifier to become temporarily inaccessible. Until the owner manually sets a valid organizer address again

Description

Under normal operation, the contract owner sets a valid organizer address responsible for managing key functionalities such as configuring passes, creating performances, and managing memorabilia collections.

However, the setOrganizer function lacks validation against the zero address (address(0)). This allows the owner to mistakenly or maliciously set the organizer to the zero address. As a result, all functions protected by the onlyOrganizer modifier become temporarily inaccessible until a valid organizer address is assigned again. This leads to disruption of critical contract operations and potential denial of service for users relying on these features


// Lack of input validation in the setOrganizer function allows setting organizer = address(0)
function setOrganizer(address _organizer) public onlyOwner {
organizer = _organizer;
}

Risk

Likelihood:

The contract owner may accidentally set the organizer address to zero when updating it without input validation

Impact:

Critical organizer-only functions such as configuring passes, creating performances, and managing memorabilia collections become inaccessible.

Proof of Concept

function test_SetOrganizer_ZeroAdd() public {
address zeroAddress = address(0);
vm.prank(owner);
festivalPass.setOrganizer(address(0));
assertEq(zeroAddress, festivalPass.organizer());
}
// ├─ [0] VM::assertEq(0x0000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000) [staticcall]

Recommended Mitigation

+ require(_organizer != address(0), "Organizer cannot be zero address");
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 month ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Zero address check

Owner/admin is trusted / Zero address check - Informational

Support

FAQs

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