Beatland Festival

AI First Flight #4
Beginner FriendlyFoundrySolidityNFT
EXP
View results
Submission Details
Impact: high
Likelihood: low
Invalid

setOrganizer() accepts address(0), permanently bricking all organizer-gated functions

Root + Impact

Missing require(_organizer != address(0)) guard. The function is called once in the constructor and again on every organizer rotation — both are moments where a zero address can slip through.

Description

setOrganizer() applies no zero-address validation:

function setOrganizer(address _organizer) public onlyOwner {
organizer = _organizer;
}

If the owner calls setOrganizer(address(0)), the onlyOrganizer modifier requires msg.sender == address(0), which is impossible for any EOA or contract. The following functions become permanently inaccessible:

  • configurePass() — no pass can be priced or supply-capped

  • createPerformance() — no performances can be scheduled

  • createMemorabiliaCollection() — no memorabilia can be launched

The owner can call setOrganizer again to recover, but only if the owner key is still available — in a compromised or renounced ownership scenario, the protocol is permanently bricked.

Risk

// Owner accidentally passes zero:
festivalPass.setOrganizer(address(0));
// All organizer functions now revert:
vm.prank(address(0xB0B)); // the real organizer
festivalPass.createPerformance(startTime, duration, reward);
// Reverts: "Only organizer can call this"
// No performances, no memorabilia, no pass configuration — forever

Proof of Concept

function test_zeroOrganizerBricksProtocol() public {
FestivalPass fp = new FestivalPass(address(bt), address(0xB0B));
fp.setOrganizer(address(0)); // owner mistake
vm.prank(address(0xB0B));
vm.expectRevert("Only organizer can call this");
fp.configurePass(1, 0.1 ether, 100);
vm.prank(address(0));
vm.expectRevert("Only organizer can call this");
fp.configurePass(1, 0.1 ether, 100);
}

Recommended Mitigation

function setOrganizer(address _organizer) public onlyOwner {
+ require(_organizer != address(0), "Organizer cannot be zero address");
organizer = _organizer;
+ emit OrganizerUpdated(_organizer);
}
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 8 hours ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!