There is no check against zero address for L2 owner when sending from L1 to L2. In the worst case, the token bridged from L1 is held by the bridge in L2 as escrow. If L2 owner is the zero address and an user executes the withdrawal function on L2 for that request, the token will be transferred from the L2 bridge to the zero address, i. e., the token will be burned.
test/Bridge.t.sol::testFail_invalidL2Owner
claims to check for the existence of a valid ownerL2
address. However, the test passes because the assert(ids.length > 0);
statement in StarklaneEscrow::_depositIntoEscrow
function fails and no actual verification of the ownerL2
address is ever performed.
Add the following test to the Bridge.t.sol
file and execute it.
Test passes because of the lack of L2 owner address verification.
Impact: High in the worst scenario
Likelihood: Low
Manual Review
Add a verification for the L2 owner address in the Starklane::depositTokens
function:
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
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.