The Starklane::startRequestCancellation
is marked as OnlyOwner
which would allow only owner of the contract to request for cancellation, but any user should be able to do it.
The same issue was reported in the previous audit as shared by the protocol, and it was marked as fixed
but it still remains the same. The function is meant to request for cancellation by an user, which would not be possible as it is marked onlyOwner
The use of Starklane::startRequestCancellation
function is to initiate a request for cancellation after a certain delay the user can call Starklane::cancelRequest
to cancel the request. These two functions work together by calling one after the other.
startRequestCancellation function
The startRequestCancellation
function calls startL1ToL2MessageCancellation
of starknet.
From the comment above startL1ToL2MessageCancellation
Hence, the function can be called only by the one who sent it
The cancelRequest
function calls cancelL1ToL2Message
of starknet.
From the comments above cancelL1ToL2Message
Hence only the sender of the message will be able to cancel the request.
Now, if startRequestCancellation
request is marked as onlyOwner
that means only owner should be able to cancel the messages, then cancelRequest
should also be marked as onlyOwner
because no one other than the owner will be able to call this function.
In short, caller of both the function should be one user who sent the message. But having different access control in both function breaks the functionality.
Manual review
Remove onlyOwner
modifier from startRequestCancellation
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.