Platform: Code4rena
Start Date: 15/12/2022
Pot Size: $128,000 USDC
Total HM: 28
Participants: 111
Period: 19 days
Judge: GalloDaSballo
Total Solo HM: 1
Id: 194
League: ETH
Rank: 95/111
Findings: 1
Award: $17.37
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: imare
Also found by: 0Kage, 0xbepresent, AkshaySrivastav, Faith, HollaDieWaldfee, Jeiwan, Saintcode_, betweenETHlines, btk, dic0de, enckrish, gz627, imare, jadezti, kaliberpoziomka8552, nogo, simon135, sk8erboy
17.3743 USDC - $17.37
https://github.com/code-423n4/2022-12-gogopool/blob/aec9928d8bdce8a5a4efe45f54c39d4fc7313731/contracts/contract/MultisigManager.sol#L67 https://github.com/code-423n4/2022-12-gogopool/blob/aec9928d8bdce8a5a4efe45f54c39d4fc7313731/contracts/contract/MinipoolManager.sol#L385
When a multisig gets disabled, the multsig that is attached to that minipool can still call functions and cause harm even though the protocol disabled it.
function recordStakingEnd( address nodeID, uint256 endTime, uint256 avaxTotalRewardAmt ) external payable { int256 minipoolIndex = onlyValidMultisig(nodeID); requireValidStateTransition(minipoolIndex, MinipoolStatus.Withdrawable); uint256 startTime = getUint(keccak256(abi.encodePacked("minipool.item", minipoolIndex, ".startTime"))); if (endTime <= startTime || endTime > block.timestamp) { revert InvalidEndTime(); }
in onlyValidMultisig
function onlyValidMultisig(address nodeID) private view returns (int256) { int256 minipoolIndex = requireValidMinipool(nodeID); address assignedMultisig = getAddress(keccak256(abi.encodePacked("minipool.item", minipoolIndex, ".multisigAddr"))); if (msg.sender != assignedMultisig) { revert InvalidMultisigAddress(); } return minipoolIndex; }
It gets the multsig that is assigned in the create mini pool function and it doesn't check if that multisig is disabled which can lead to a loss for node operators if the multisig is hacked.
Vim
add a check for that multsig address that is enabled in the protocol
/// pseudo-code
function onlyValidMultisig(address nodeID) private view returns (int256) { int256 minipoolIndex = requireValidMinipool(nodeID); address assignedMultisig = getAddress(keccak256(abi.encodePacked("minipool.item", minipoolIndex, ".multisigAddr"))); if (msg.sender != assignedMultisig) { revert InvalidMultisigAddress(); } unit index=getIndexOf(assignedMultisig); (address mulit,bool enabled)=getMultisig(index); if(enabled==false){ revert(); } return minipoolIndex; }
#0 - c4-judge
2023-01-08T12:54:48Z
GalloDaSballo marked the issue as duplicate of #618
#1 - c4-judge
2023-02-01T19:57:26Z
GalloDaSballo marked the issue as duplicate of #702
#2 - GalloDaSballo
2023-02-02T11:57:09Z
See #618
#3 - c4-judge
2023-02-02T11:57:15Z
GalloDaSballo marked the issue as partial-50