After the contract has been deployed, the initialize function has to be called so as to setup the contract with its various paramteters. And looking at the function, we can see that ownership is first transferred to the owner and then, the setStarklaneL2Address and setStarklaneL2Selector functions are called.
The setStarklaneL2Address and setStarklaneL2Selector functions however, are protected by the onlyOwner modifier which ensures that msg.sender is the owner.
And the contract is UUPSOwnableProxied/StarklaneState which are both Ownable contracts.
This means that upon deployment, ownership is immediately granted to the deployer.
So the only party that can call the initialize function is the deployer, but if he wishes to transfer ownership upon initialization, he will not be able to do so as the function will revert with a "caller is not owner" error
Call the _transferOwnership
function after setting the starklane addresses not before.
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.