Open c4-bot-7 opened 8 months ago
Reorg doesn't work that way. But "the owner list should not be empty after removal" makes this a duplicate of #18.
raymondfam marked the issue as sufficient quality report
raymondfam marked the issue as duplicate of #18
raymondfam marked the issue as duplicate of #22
raymondfam marked the issue as duplicate of #181
3docSec marked the issue as satisfactory
3docSec changed the severity to QA (Quality Assurance)
3docSec marked the issue as grade-b
Lines of code
https://github.com/code-423n4/2024-03-coinbase/blob/e0573369b865d47fed778de00a7b6df65ab1744e/src/SmartWallet/MultiOwnable.sol#L102-L110
Vulnerability details
Impact
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.
Proof of Concept
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.
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.Tools Used
Manual
Recommended Mitigation Steps
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).
Assessed type
Governance