Initializing the Starklane contract with the owner being different from the caller will revert the initialization
When the Starklane is initialized it is needed to pass in some data. In this data there is encoded the owner that will be set to the contract, the Starknet core address and the starknet bridge contract and the selector of the function to call when transfering messages. Apparently, it seems that the caller can set the owner to any address he wants. However, it does not work that way because when it will execute either setStarklaneL2Address or setStarklaneL2Selector will check that the msg.sender is the previously set owner.
Hence if the owner passed in the data is a different address from the caller of the initialize function it will revert.
The impact of this issue is not severe but it still forces that the owner has to be the caller of the initialize function.
Manual review
If the intended behaviour is that the owner HAS to be the caller of the initialize function then it makes no sense to pass the owner in the data, it is as easy as set the owner to the msg.sender.
If the intended behaviour is that it should be possible to set the owner to an address that is not the caller, the following code should be changed.
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.