code-423n4 / 2024-07-karak-findings

0 stars 0 forks source link

Operators can finalize their vault staking to DSS even after unregistering from them due to missing registered check for operator on DSS #62

Closed howlbot-integration[bot] closed 2 months ago

howlbot-integration[bot] commented 2 months ago

Lines of code

https://github.com/code-423n4/2024-07-karak/blob/main/src/Core.sol#L146

Vulnerability details

Impact

Proof of Concept

    function finalizeUpdateVaultStakeInDSS(Operator.QueuedStakeUpdate memory queuedStake)
        external
        nonReentrant
        whenFunctionNotPaused(Constants.PAUSE_CORE_FINALIZE_STAKE_UPDATE)
    {
        _self().validateAndUpdateVaultStakeInDSS(queuedStake);
        emit FinishedStakeUpdate(queuedStake);
    }

Tools Used

Manual Review

Recommended Mitigation Steps

In the finalizeUpdateVaultStakeInDSS, add the following function check:

isOperatorRegisteredToDSS(queuedStake.operator, queuedStake.updateRequest.dss)

Assessed type

Context

c4-judge commented 2 months ago

MiloTruck marked the issue as unsatisfactory: Out of scope