Missing Validation to Ensure Hot Signers are Safe Owners #11
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
primary issue
Highest quality submission among a set of duplicates
🤖_primary
AI based primary recommendation
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
sufficient quality report
This report is of sufficient quality
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/solidity-labs-io/kleidi/blob/0d72b6cb5725c1380212dc76257da96fcfacf22f/src/Timelock.sol#L52
https://github.com/solidity-labs-io/kleidi/blob/0d72b6cb5725c1380212dc76257da96fcfacf22f/src/Timelock.sol#L264-L309
https://github.com/solidity-labs-io/kleidi/blob/0d72b6cb5725c1380212dc76257da96fcfacf22f/src/Timelock.sol#L759-L769
Vulnerability details
Description
In the
Timelock
contract, there is no check to ensure that thehotSigners
are the same as the owners of thesafe
.According to the comment on #L:52, "only safe owners can execute whitelisted calldatas," but the constructor and the
grantRole()
functions do not verify that hot signers are also safe owners.The separation of the
owners
array for the safe contract and thehotSigners
array for the timelock contract introduces the risk that non-safe owners could be granted theHOT_SIGNER_ROLE
and have ablity to execute whitelisted calldatas.This weakens the intended security model of the system by allowing external or unauthorized addresses to gain the ability to execute privileged actions.
Impact
Non-safe owners may be granted the
HOT_SIGNER_ROLE
, enabling them to execute whitelisted calldatas without being authorized.Proof of Concepts
In Timelock constructor, hot signers are granted
HOT_SIGNER_ROLE
, without any checks to ensure they are also safe owners as it's stated in #L:52.the safe
owners
array andhotSigners
array are separate, and nothing ensures in TimelockFactory thatowners[i] == hotsigner[i]
when Deploying Timelock.The grantRole() function does not validate the
account
against the list of safe owners to ensure only safe owners can haveHOT_SIGNER_ROLE
, this allows an arbitrary address to be assignedHOT_SIGNER_ROLE
, even if they may not be one of the safe owners.Recommended mitigation
Add a check in the Timelock constructor to ensure that the account we are assigning
HOT_SIGNER_ROLE
to, is one of the safe owners.remove
hotSigners
array from DeploymentParams struct as member and simply pass safeowners
array on deployment of Timelock, to assignHOT_SIGNER_ROLE
to each safe owner.add a check in
Timelock::grantRole()
function to ensure account is one of the current owners of safe.Assessed type
Other
The text was updated successfully, but these errors were encountered: