Closed c4-submissions closed 10 months ago
raymondfam marked the issue as low quality report
Invalid assumptions.
raymondfam marked the issue as primary issue
While the Warden's statement is correct in relation to the ExecutorPlugin
, the SafeDeployer::deploySubAccount
function will deploy a sub-account with the Console Account registered as a module.
As such, the Console Account can invoke the ModuleManager::execTransactionFromModule
function to f.e. perform a transaction on behalf of the Console Account via the sub-account. This fact is missed by the Warden rendering their submission invalid.
alex-ppg marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2023-10-brahma/blob/main/contracts/src/core/ExecutorPlugin.sol#L69 https://github.com/code-423n4/2023-10-brahma/blob/main/contracts/src/core/ExecutorPlugin.sol#L112
Vulnerability details
The Executor is an account authorized to make module transactions on a subAccount via ExecutorPlugin. The executor is assigned/registered by the subaccount created by the console account. But the console account itself cannot execute the transaction & is dependent on the executor to carry it out because if the console account tries to execute, the transaction will revert.
Proof of Concept
executeTransaction()
nables executors to raise execution requests that will be executed via a module transaction. It calls_validateExecutionRequest(execRequest);
to validate the request.In
_validateExecutionRequest()
, theif
condition checks if the executor is valid for a given account & reverts otherwise.The issue lies that the creator of the subaccount that is the console account itself cannot execute the transaction on its subaccount if the subaccount does not registers the console account as an executor. The
isExecutor()
will returnsfalse
in such a situation.Impact
The transaction will always revert if a console account tries to execute a transaction on its subaccount.
Tools Used
Manual Review
Recommended Mitigation Steps
Automatically add the owner of the subaccount (console account) as an executor.
Assessed type
Error