Submitted by Ruhum
https://github.com/initia-labs/OPinit/blob/7da22a78f367cb25960ed9c536500c2754bd5d06/x/ophost/keeper/msg_server.go#L145
https://github.com/initia-labs/OPinit/blob/7da22a78f367cb25960ed9c536500c2754bd5d06/x/ophost/keeper/msg_server.go#L351-L365
Anybody can create an L2 and its bridge. They set their own proposer and challenger to handle the output proposals. If the proposer sets the L2 block number of an output proposal to the max value of a uint64, any subsequent output proposal will fail preventing users from withdrawing their funds.
In ophosts ProposeOutput() endpoint the module returns an error if the given L2 block number is smaller than the last proposed output:
By proposing an output with l2BlockNumber = 2^64 - 1 any subsequent call will fail.
A bridges admin, proposer, and challenger are not trusted users. Instead, the module allows the L1 governance account (authority), to take over the bridge in case the admin misbehaves, see UpdateProposer(). However, with this attack vector, the governance account cannot reverse the attack or rescue funds unless it deletes the malicious output before it is finalized, see DeleteOutputProposal().
The governance account has to react in a matter of minutes or an hour (depending on the bridges configuration).
This will always be an issue as long as the L2 block number is an unverified input by the proposer. Maybe you can fully remove it and just depend on the output index thats tracked by the module.
beer-1 (Initia) acknowledged and commented:
a_kalout (warden) commented:
LSDan (judge) commented:
For this audit, 2 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by _karanel received the top score from the judge.
The following wardens also submitted reports: 0xozovehe.
