code4rena-2023-01-biconomy-l06
[L-06] A single point of failure
Summary
owner에게 너무 많은 권한이 있어 owner 계정을 탈취당하면 큰 피해가 발생할 수 있으므로, 중요한 기능에는 timelock을 이용하여 즉시 반영되지 않고 버퍼를 낄 수 있도록 하라 제안했다.
Keyword
timelock, single point of failure
Vulnerability
owner에게 너무 많은 권한이 쏠려있다고 지적했다. 단일 실패 지점(single point of failure)의 위험이 너무 크다.
프로토콜 어드민이나 개발자가 악의적이지 않더라도, 키가 도난당할 가능성이 있다. 이 경우 프로젝트에 심각한 피해를 줄 수 있다.
14 results - 3 files
contracts/smart-contract-wallet/SmartAccount.sol:
72: // onlyOwner
76: modifier onlyOwner {
81: // onlyOwner OR self
449: function transfer(address payable dest, uint amount) external nonReentrant onlyOwner {
455: function pullTokens(address token, address dest, uint256 amount) external onlyOwner {
460: function execute(address dest, uint value, bytes calldata func) external onlyOwner{
465: function executeBatch(address[] calldata dest, bytes[] calldata func) external onlyOwner{
536: function withdrawDepositTo(address payable withdrawAddress, uint256 amount) public onlyOwner {
contracts/smart-contract-wallet/paymasters/BasePaymaster.sol:
24: function setEntryPoint(IEntryPoint _entryPoint) public onlyOwner {
67: function withdrawTo(address payable withdrawAddress, uint256 amount) public virtual onlyOwner {
75: function addStake(uint32 unstakeDelaySec) external payable onlyOwner {
90: function unlockStake() external onlyOwner {
99: function withdrawStake(address payable withdrawAddress) external onlyOwner {
contracts/smart-contract-wallet/paymasters/verifying/singleton/VerifyingSingletonPaymaster.sol:
65: function setSigner( address _newVerifyingSigner) external onlyOwner{Impact
owner에게 너무 많은 권한이 있어 owner 계정을 탈취당하면 큰 피해가 발생할 수 있다.
Mitigation
중요한 기능에는 timelock을 이용하여 버퍼를 넣는다. 오프체인에서 이벤트를 읽어 상태를 확인하고 보고한다. 공격자가 변경을 하더라도 버퍼 시간동안 유저들이 참여/종료 여부를 고려할 수 있다.
tags: bughunting, smart contract, biconomy, account abstraction, erc4337, timelock, ownable, wallet, severity low