You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The BaseRecoverableAccount implements inconsistencies in its recovery and lock states as the contract may become unlocked after being set to recovery mode, a mechanism that should be disallowed.
Impact:
The recovery and lock state management of the BaseRecoverableAccount is inconsistent, resulting in accounts that may be set to recovery mode, become unlocked, activate new signers, and pass a recovery attempt with an incorrect majority validation under specific circumstances.
Example:
/** * @notice Finalizes an ongoing recovery procedure if the security period (executeAfter) is over. * The method is public and callable by anyone. * @param _signatures Array of guardian signatures concatenated. * @notice The arguments should be ordered by the address of the guardian signing the message */function completeRecovery(bytes[] calldata_signatures) externalvirtual {
_requireRecovery(true);
if (recoveryDetails.executeAfter >uint64(block.timestamp)) revertOngoingRecovery();
require(recoveryDetails.guardiansRequired >0, "No guardians set on wallet");
if (recoveryDetails.guardiansRequired != _signatures.length) revertInvalidSignatureAmount();
if (!_validateSignatures(_signatures)) revertInvalidRecoverySignatures();
address recoveryOwner = recoveryDetails.recoveryAddress;
delete recoveryDetails;
_transferOwnership(recoveryOwner);
_setLock(0);
emitRecoveryCompleted(recoveryOwner);
}
Recommendation:
We advise the system's state management to be refactored so as to ensure the system remains locked for as long as a recovery is in effect, prevents unlocking when an unexpired recovery period is currently in effect, and allows a recovery period to be reset after it has expired.
The text was updated successfully, but these errors were encountered:
What does "activate new signers" refer to? If it means adding new guardians, please note that it's an action reserved for the account owner and enforced with the onlyOwner modifier.
BRA-03M: Inconsistent Recovery & Lock States
Description:
The
BaseRecoverableAccount
implements inconsistencies in its recovery and lock states as the contract may become unlocked after being set to recovery mode, a mechanism that should be disallowed.Impact:
The recovery and lock state management of the
BaseRecoverableAccount
is inconsistent, resulting in accounts that may be set to recovery mode, become unlocked, activate new signers, and pass a recovery attempt with an incorrect majority validation under specific circumstances.Example:
Recommendation:
We advise the system's state management to be refactored so as to ensure the system remains locked for as long as a recovery is in effect, prevents unlocking when an unexpired recovery period is currently in effect, and allows a recovery period to be reset after it has expired.
The text was updated successfully, but these errors were encountered: