Godfather cannot reclaim admin rights for the Kernel
contract, as a call to Laundrette::retrieveAdmin
will always fail.
By default, the Kernel
contract recognizes two distinguished roles: admin
and executor
, both of which are set to the address of the deployer of Kernel
:
admin
is later changed to the address of Laundrette
by Deployer::deploy
:
With this, Godfather loses access to functions Kernel::grantRole
and Kernel::revokeRole
which are both gated by the onlyAdmin
modifier.
Laundrette::retrieveAdmin
should supposedly allow Godfather to reclaim admin
rights :
However, a call to this function will always fail. The call chain would be as follows:
Godfather calls Laundrette::retrieveAdmin
.
Laundrette calls kernel.executeAction(Actions.ChangeAdmin, kernel.executor());
Kernel::executeAction
's onlyExecutor
modifier restricts its use to msg.sender == executor
.
Even though Godfather is the executor
and the originator of the call flow is him, in Kernel
's context the msg.sender
is not the Godfather but Laundrette
.
(msg.sender
is a dynamic variable and is always the address that directly initiates a given call to a contract).
The following piece of test demonstrates that
Godfather is not the admin
of Kernel
He cannot reclaim admin
rights via Laundrette::retrieveAdmin
He can reclaim admin
rights via a direct call to Kernel::executeAction
By doing so, he breaks other Laundrette
functionality like Laundrette:addToGang
and Laundrette::quitTheGang
The impact is limited:
although Godfather cannot reclaim admin
rights to Kernel
via Laundrette::retrieveAdmin, he can still do so by executing
kernel.executeAction(Actions.ChangeAdmin, godFather);`;
under normal circumstances, Godfather should not be the admin
anyways, because that breaks other Laundrette
functionality like Laundrette:addToGang
and Laundrette::quitTheGang
. Probably the only meaningful use of this function would be for circumventing another bug (where Godfather has no gangmember
role and cannot access Laundrette
functions reserved for this role.
Manual reivew, Foundry.
Revisit the need for need for Laundrette::retrieveAdmin
. If all other bugs are fixed, this function might not be needed:
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.