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: 51/51
Findings: 1
Award: $6.95
🌟 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
6.9492 USDC - $6.95
The wallet is expected to be deployed on Ethereum, Base, Optimism, Arbitrum, Polygon, BNB, Avalanche, Gnosis. However, in L2, there might be reorg attack which could lead to a user accidentally loses control of the wallet. Thus the funds stored in the contracts are permanently lost.
There's no restriction on the situation that a owner shouldn't remove himself or the owner list can not be empty in the function removeOwnerAtIndex . Thus the wallet is vulnerable to reorg attack.
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); }
Consider the following situation:
addOwnerAddress
with address A to add address B as the owner.removeOwnerAtIndex
with address A to remove address A as the owner.Manual
Add restriction that a user can not remove himself or the owner list should not be empty after removal (use a counter to count owner numbers).
Governance
#0 - raymondfam
2024-03-22T03:41:34Z
Reorg doesn't work that way. But "the owner list should not be empty after removal" makes this a duplicate of #18.
#1 - c4-pre-sort
2024-03-22T03:42:22Z
raymondfam marked the issue as sufficient quality report
#2 - c4-pre-sort
2024-03-22T03:42:30Z
raymondfam marked the issue as duplicate of #18
#3 - c4-pre-sort
2024-03-22T22:32:15Z
raymondfam marked the issue as duplicate of #22
#4 - c4-pre-sort
2024-03-24T14:46:46Z
raymondfam marked the issue as duplicate of #181
#5 - c4-judge
2024-03-27T09:16:22Z
3docSec marked the issue as satisfactory
#6 - c4-judge
2024-03-27T18:01:27Z
3docSec changed the severity to QA (Quality Assurance)
#7 - c4-judge
2024-03-27T18:06:16Z
3docSec marked the issue as grade-b