Paused Bridge will allow Users to Initiate a bridge and Lock Funds In the Bridge
Summary
There are no checks for if the bridge is paused when initiating a bridging event, this can lead to loss of user funds since the transaction will be successful one side but always revert when the transaction is attempted to be finalized on the other side. This can lead to a loss of user funds that will be locked in the bridge.
There are additional entry points in the contract.
Internal pre-conditions
This test first sets the bridge state to paused by mocking the guardian address and calling the SuperChainConfig::pause. Even though the bridge is paused anyone can freely call the functions inside the bridge contract to initiate a bridging event. However, the finalizing part of the the bridging event does check the paused state of the contract and will always revert. As a result, user will still deposit into the bridge and lose their funds since the transaction will never be finalized on the layer 1 chain or the layer 2 chain respectively.
External pre-conditions
No response
Attack Path
No response
Impact
Users can initiate a bridge of tokens/ether that will never be finalized and locked in the contract if the bridge is paused since the messages cannot be replayed.
PoC
Place the following contract into L1StandardBridge.t.sol and the run the test with the following command forge test --mt test_paused_bridge_can_still_initiate_bridging
IzuMan
Medium
Paused Bridge
will allowUsers
to Initiate a bridge andLock Funds
In the BridgeSummary
There are no checks for if the bridge is paused when initiating a bridging event, this can lead to loss of user funds since the transaction will be successful one side but always revert when the transaction is attempted to be finalized on the other side. This can lead to a loss of user funds that will be locked in the bridge.
Root Cause
No checks for the paused status:
One example is found here: GitHub Link
Internal pre-conditions
This test first sets the bridge state to paused by mocking the
guardian
address and calling theSuperChainConfig::pause
. Even though the bridge is paused anyone can freely call the functions inside the bridge contract to initiate a bridging event. However, the finalizing part of the the bridging event does check thepaused state
of the contract and will always revert. As a result, user will still deposit into the bridge and lose their funds since the transaction will never be finalized on the layer 1 chain or the layer 2 chain respectively.External pre-conditions
No response
Attack Path
No response
Impact
Users can initiate a bridge of tokens/ether that will never be finalized and locked in the contract if the bridge is paused since the messages cannot be replayed.
PoC
Place the following contract into
L1StandardBridge.t.sol
and the run the test with the following commandforge test --mt test_paused_bridge_can_still_initiate_bridging
Mitigation
Include the
whenNotPaused
modifier on functions that initiate a bridging event.