Coinbase Smart Wallet - 0xhacksmithh's results

Smart Wallet from Coinbase Wallet

General Information

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

Coinbase

Findings Distribution

Researcher Performance

Rank: 20/51

Findings: 1

Award: $36.34

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

36.3397 USDC - $36.34

Labels

bug
downgraded by judge
grade-a
QA (Quality Assurance)
sufficient quality report
:robot:_08_group
duplicate-18
Q-05

External Links

Lines of code

https://github.com/code-423n4/2024-03-coinbase/blob/main/src/SmartWallet/MultiOwnable.sol#L102-L110

Vulnerability details

Impact

At the end wallet remain with no owners or with malicious owner.

Proof of Concept

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.

Tools Used

There should be Master Owner so he can revert Malicious Owner act

Assessed type

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

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter