code-423n4 / 2023-01-biconomy-findings

6 stars 8 forks source link

Frontrunning `deployCounterFactualWallet` #522

Closed code423n4 closed 1 year ago

code423n4 commented 1 year ago

Lines of code

https://github.com/code-423n4/2023-01-biconomy/blob/main/scw-contracts/contracts/smart-contract-wallet/SmartAccountFactory.sol#L26-L39

Vulnerability details

_entryPoint and _handler are not included in the salt, so a front-running attack could be possible for the same _owner and _index (same counterfactual address) with malicious _entryPoint and _handler (DoS/freeze funds) only entryPoint can be updated, not handler. Add to salt and below for getAddressForCounterfactual.

c4-judge commented 1 year ago

gzeon-c4 marked the issue as duplicate of #460

c4-sponsor commented 1 year ago

livingrockrises marked the issue as sponsor confirmed

livingrockrises commented 1 year ago

should be high risk as per other proofs

c4-judge commented 1 year ago

gzeon-c4 marked the issue as satisfactory

c4-judge commented 1 year ago

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