code4rena-2023-01-biconomy-l10

[L-10] Use 2StepSetOwner instead of setOwner

보고서

Summary

실수로 owner를 잘못 설정할 수도 있으므로, 2 step으로 설정하도록 변경하라 제안했다.

Keyword

Vulnerability

1 result - 1 file
 
contracts/smart-contract-wallet/SmartAccount.sol:
  109:     function setOwner(address _newOwner) external mixedAuth {
  110:         require(_newOwner != address(0), "Smart Account:: new Signatory address cannot be zero");
  111:         address oldOwner = owner;
  112:         owner = _newOwner;
  113:         emit EOAChanged(address(this), oldOwner, _newOwner);
  114:     }

중요한 역할을 맡은 owner 설정을 2 step으로 변경하라 제안했다.

Impact

실수로 address(0) 등 잘못된 owner로 설정할 수 있다.

Mitigation

새 owner를 apporve 하고, 새 owner로 컨트랙트콜 하여 최종적으로 owner 권한을 받도록 2 step으로 변경한다.


tags: bughunting, smart contract, biconomy, account abstraction, erc4337, wallet, severity low