DSS cannot force jailed operator to unallocate from such DSS #20
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
insufficient quality report
This report is not of sufficient quality
🤖_primary
AI based primary recommendation
🤖_128_group
AI based duplicate group recommendation
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2024-07-karak/blob/53eb78ebda718d752023db4faff4ab1567327db4/src/Core.sol#L130-L141
https://github.com/code-423n4/2024-07-karak/blob/53eb78ebda718d752023db4faff4ab1567327db4/src/Core.sol#L113-L124
Vulnerability details
Impact
According to https://github.com/code-423n4/2024-07-karak?tab=readme-ov-file#operators,
Operators can be jailed by the DSS
and one of the effects of jailing isforcing them to unallocate from the DSS
. However, the followingCore.requestUpdateVaultStakeInDSS
andCore.unregisterOperatorFromDSS
functions all requiremsg.sender
to be the operator so only the operator can choose to unallocate from the DSS; although the operator is jailed by the DSS, the DSS is unable to call theCore.requestUpdateVaultStakeInDSS
function for requesting the unstaking of such operator's vault from the DSS or theCore.unregisterOperatorFromDSS
function for unregistering such operator from the DSS. Thus, the DSS fails to force the jailed operator to unallocate from the DSS and cannot prevent all further interactions caused by such operator.https://github.com/code-423n4/2024-07-karak/blob/53eb78ebda718d752023db4faff4ab1567327db4/src/Core.sol#L130-L141
https://github.com/code-423n4/2024-07-karak/blob/53eb78ebda718d752023db4faff4ab1567327db4/src/Core.sol#L113-L124
Proof of Concept
The following steps can occur for the described scenario.
Core.requestUpdateVaultStakeInDSS
function cannot be called by DSS A for unstaking Operator A's vault from DSS A and theCore.unregisterOperatorFromDSS
function cannot be called by DSS A for unregistering Operator A from DSS A, DSS A fails to force Operator A to unallocate from DSS A and cannot prevent all further interactions caused by Operator A.Tools Used
Manual Review
Recommended Mitigation Steps
The
Core
contract can be updated to add a function, which is similar to theCore.requestUpdateVaultStakeInDSS
function, to only allow a DSS to request the unstaking of its associated operator's vault from such DSS and a function, which is similar to theCore.unregisterOperatorFromDSS
function, to only allow a DSS to unregister its associated operator from such DSS.Assessed type
Other
The text was updated successfully, but these errors were encountered: