Normal Behavior:
The owner should be able to set the festival contract address once, and minting/burning should be possible by the festival contract.
Issue:
The setFestivalContract
function does not validate that the provided _festival
address is non-zero. If the owner sets the festival contract to the zero address, all minting and burning operations are permanently disabled, as only the zero address can call these functions (which is impossible).
Likelihood: High
The owner may accidentally set the zero address due to a typo or UI bug.
There is no way to recover from this mistake, as the function can only be called once.
Impact: High
All minting and burning operations are permanently disabled.
The token contract becomes unusable for its intended purpose.
This PoC demonstrates how the contract can be bricked by setting the festival contract to the zero address. After this, all minting and burning operations will revert, making the token unusable.
To prevent this, add a check to ensure the festival contract address is not zero before setting it. This guarantees the contract cannot be bricked by accident.
Owner/admin is trusted / Zero address check - Informational
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.