Platform: Code4rena
Start Date: 14/03/2024
Pot Size: $49,000 USDC
Total HM: 3
Participants: 51
Period: 7 days
Judge: 3docSec
Id: 350
League: ETH
Rank: 20/51
Findings: 1
Award: $36.34
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xmystery
Also found by: 0xbrett8571, 0xhacksmithh, 7ashraf, Bigsam, Circolors, IceBear, Jorgect, Koala, Limbooo, SBSecurity, Tigerfrake, ZanyBonzy, aycozynfada, cheatc0d3, cryptphi, d3e4, doublespending, foxb868, gpersoon, imare, jesjupyter, lsaudit, robriks, shealtielanz, y4y
36.3397 USDC - $36.34
https://github.com/code-423n4/2024-03-coinbase/blob/main/src/SmartWallet/MultiOwnable.sol#L102-L110
At the end wallet remain with no owners or with malicious owner.
In MultiOwnable.sol there is a function removeOwnerAtIndex()
which allow a Owner
to remove other owners
function removeOwnerAtIndex(uint256 index) public virtual onlyOwner { bytes memory owner = ownerAtIndex(index); if (owner.length == 0) revert NoOwnerAtIndex(index); delete _getMultiOwnableStorage().isOwner[owner]; delete _getMultiOwnableStorage().ownerAtIndex[index]; emit RemoveOwner(index, owner); }
Here is onlyOwner() modifier
which implemented as follows
modifier onlyOwner() virtual { _checkOwner(); _; }
function _checkOwner() internal view virtual { if (isOwnerAddress(msg.sender) || (msg.sender == address(this))) { return; } revert Unauthorized(); }
function isOwnerAddress(address account) public view virtual returns (bool) { return _getMultiOwnableStorage().isOwner[abi.encode(account)]; }
Here you clearly see that OnlyOwner
check boil down to isOwnerAddress()
which ensure that if a user is Owner then he can remove
other owners from index via deleting.
And same he can do with himselfe as well.
If one of the Owner goes malicious then he can kick out all other owners.
There should be Master Owner so he can revert Malicious Owner act
Access Control
#0 - c4-pre-sort
2024-03-21T22:21:06Z
raymondfam marked the issue as sufficient quality report
#1 - c4-pre-sort
2024-03-21T22:21:18Z
raymondfam marked the issue as duplicate of #18
#2 - raymondfam
2024-03-21T22:21:51Z
See #18.
#3 - c4-pre-sort
2024-03-22T22:32:23Z
raymondfam marked the issue as duplicate of #22
#4 - c4-pre-sort
2024-03-24T14:46:53Z
raymondfam marked the issue as duplicate of #181
#5 - c4-judge
2024-03-27T09:02:08Z
3docSec marked the issue as not a duplicate
#6 - c4-judge
2024-03-27T09:02:15Z
3docSec marked the issue as duplicate of #18
#7 - c4-judge
2024-03-27T10:20:16Z
3docSec changed the severity to QA (Quality Assurance)
#8 - c4-judge
2024-03-27T10:21:30Z
3docSec marked the issue as grade-a