MainToken.set_mint_multisig() doesn’t check that _minting_multisig doesn’t equal zero
The function MainToken.set_mint_multisig() does not check that the new minting multisig address is not the zero address. If called with the zero address, the system permanently loses its minting multisig without the ability to set a new one.
Submitted by pants
The function MainToken.set_mint_multisig() doesn’t check that _minting_multisig doesn’t equal zero before it sets it as the new minting_multisig.
Impact
This function can be invoked by mistake with the zero address as _minting_multisig, causing the system to lose its minting_multisig forever, without the option to set a new minting_multisig.
Tool Used
Manual code review.
Recommended Mitigation Steps
Check that _minting_multisig doesn’t equal zero before setting it as the new minting_multisig.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
The system could permanently lose its minting multisig, with no option to set a new one, if the function is called with the zero address by mistake.
What the attacker needed
Function callable by authorised user; accidental zero address input
The fix
The function should be fixed to check that `_minting_multisig` is not the zero address before setting it.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract has a special address (the minting multisig) that controls who can create new tokens. The function that updates this address forgot to check that the new address is not the zero address (a placeholder that cannot receive funds or perform actions). If someone accidentally sets it to zero, the contract can never change it again, so the ability to mint tokens is lost forever.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.