A typo in stateTransistionManager.unfreezeChain would cause a DOS when the stateTransitionManager attempts to unfreeze a previously frozen chain. It would revert due to the check in Admin.freezeDiamond which requires that the chain is not already frozen. This means the stateTransitionManager would not be able to unfreeze any chain that had already been frozen using the stateTransitionManager.unfreezeChain. This would cause any chain which has been frozen to remain frozen until the contract or facets are redeployed, effectively DOSsing that chain.
The function stateTransitionManager.unfreezeChain which would be called by an admin/owner when attempting to unfreeze a previously frozen chain would always revert because this function instead would call the Admin.freezeDiamond instead of Admin.unfreezeDiamond. Due to checks in the freezeDiamond function, since this chain is already frozen, this would cause a revert.
Lines of code
https://github.com/code-423n4/2024-03-zksync/blob/4f0ba34f34a864c354c7e8c47643ed8f4a250e13/code/contracts/ethereum/contracts/state-transition/StateTransitionManager.sol#L166
Vulnerability details
Impact
A typo in
stateTransistionManager.unfreezeChain
would cause a DOS when the stateTransitionManager attempts to unfreeze a previously frozen chain. It would revert due to the check inAdmin.freezeDiamond
which requires that the chain is not already frozen. This means the stateTransitionManager would not be able to unfreeze any chain that had already been frozen using thestateTransitionManager.unfreezeChain
. This would cause any chain which has been frozen to remain frozen until the contract or facets are redeployed, effectively DOSsing that chain.Proof of Concept
The function
stateTransitionManager.unfreezeChain
which would be called by an admin/owner when attempting to unfreeze a previously frozen chain would always revert because this function instead would call theAdmin.freezeDiamond
instead ofAdmin.unfreezeDiamond
. Due to checks in the freezeDiamond function, since this chain is already frozen, this would cause a revert.Tools Used
Manual review
Recommended Mitigation Steps
freezeDiamond()
tounfreezeDiamond
which is the expected logic.Assessed type
DoS