Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not verified function inputs of public / external functions #29

Open
code423n4 opened this issue Dec 14, 2021 · 1 comment
Open

Not verified function inputs of public / external functions #29

code423n4 opened this issue Dec 14, 2021 · 1 comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working

Comments

@code423n4
Copy link
Contributor

Handle

robee

Vulnerability details

Not verified address arguments of external/public functions is a low risk issue.
It's less severe for onlyOwner methods but for any other method it's crucial since the default address is 0.

This is a full list of such not verified inputs:

    Argument _basket of RebalanceManager.sol.constructor is not verified to be != 0
    Argument _uniswapV2Like of RebalanceManager.sol.constructor is not verified to be != 0
    Argument _uniswapV3 of RebalanceManager.sol.constructor is not verified to be != 0
    Argument _rebalanceManager of RebalanceManager.sol.setRebalanceManager is not verified to be != 0
    Argument _exchange of RebalanceManager.sol.setExchange is not verified to be != 0
    Argument recipient of RebalanceManager.sol._swapUniswapV3 is not verified to be != 0
    Argument recipient of RebalanceManager.sol._swapUniswapV2 is not verified to be != 0
    Argument _token of RebalanceManager.sol.removeToken is not verified to be != 0
    Argument _token of RebalanceManager.sol.addToken is not verified to be != 0
    Argument _basket of RebalanceManagerV2.sol.constructor is not verified to be != 0
    Argument _uniswapV2Like of RebalanceManagerV2.sol.constructor is not verified to be != 0
    Argument _rebalanceManager of RebalanceManagerV2.sol.setRebalanceManager is not verified to be != 0
    Argument _exchange of RebalanceManagerV2.sol.setExchange is not verified to be != 0
    Argument recipient of RebalanceManagerV2.sol._swapUniswapV2 is not verified to be != 0
    Argument _token of RebalanceManagerV2.sol.removeToken is not verified to be != 0
    Argument _token of RebalanceManagerV2.sol.addToken is not verified to be != 0
    Argument _basket of RebalanceManagerV3.sol.constructor is not verified to be != 0
    Argument _uniswapV2Like of RebalanceManagerV3.sol.constructor is not verified to be != 0
    Argument _rebalanceManager of RebalanceManagerV3.sol.setRebalanceManager is not verified to be != 0
    Argument _exchange of RebalanceManagerV3.sol.setExchange is not verified to be != 0
    Argument exchange of RebalanceManagerV3.sol._swapUniswapV2 is not verified to be != 0
    Argument recipient of RebalanceManagerV3.sol._swapUniswapV2 is not verified to be != 0
    Argument _token of RebalanceManagerV3.sol.removeToken is not verified to be != 0
    Argument _token of RebalanceManagerV3.sol.addToken is not verified to be != 0
    Argument _token of BasketFacet.sol.addToken is not verified to be != 0
    Argument _token of BasketFacet.sol.removeToken is not verified to be != 0
    Argument _beneficiary of BasketFacet.sol.setFeeBeneficiary is not verified to be != 0
    Argument _token of BasketFacet.sol.getTokenInPool is not verified to be != 0
    Argument _token of BasketFacet.sol.balance is not verified to be != 0
    Argument _caller of CallFacet.sol.addCaller is not verified to be != 0
    Argument _caller of CallFacet.sol.removeCaller is not verified to be != 0
    Argument _target of CallFacet.sol.singleCall is not verified to be != 0
    Argument _target of CallFacet.sol._call is not verified to be != 0
    Argument _caller of CallFacet.sol.canCall is not verified to be != 0
    Argument _receiver of ERC20Facet.sol.mint is not verified to be != 0
    Argument _from of ERC20Facet.sol.burn is not verified to be != 0
    Argument _spender of ERC20Facet.sol.approve is not verified to be != 0
    Argument _spender of ERC20Facet.sol.increaseApproval is not verified to be != 0
    Argument _spender of ERC20Facet.sol.decreaseApproval is not verified to be != 0
    Argument _to of ERC20Facet.sol.transfer is not verified to be != 0
    Argument _from of ERC20Facet.sol.transferFrom is not verified to be != 0
    Argument _to of ERC20Facet.sol.transferFrom is not verified to be != 0
    Argument _owner of ERC20Facet.sol.allowance is not verified to be != 0
    Argument _spender of ERC20Facet.sol.allowance is not verified to be != 0
    Argument _of of ERC20Facet.sol.balanceOf is not verified to be != 0
    Argument _from of ERC20Facet.sol._transfer is not verified to be != 0
    Argument _to of ERC20Facet.sol._transfer is not verified to be != 0
    Argument _to of LibERC20.sol.mint is not verified to be != 0
    Argument _from of LibERC20.sol.burn is not verified to be != 0
    Argument _controller of PieFactoryContract.sol.setDefaultController is not verified to be != 0
    Argument _diamondImplementation of PieFactoryContract.sol.setDiamondImplementation is not verified to be != 0
    Argument _beneficiary of IBasketFacet.sol.setFeeBeneficiary is not verified to be != 0
    Argument _token of IBasketFacet.sol.balance is not verified to be != 0
    Argument _token of IBasketFacet.sol.addToken is not verified to be != 0
    Argument _token of IBasketFacet.sol.removeToken is not verified to be != 0
    Argument _token of IBasketFacet.sol.getTokenInPool is not verified to be != 0
    Argument _target of ICallFacet.sol.singleCall is not verified to be != 0
    Argument _caller of ICallFacet.sol.addCaller is not verified to be != 0
    Argument _caller of ICallFacet.sol.removeCaller is not verified to be != 0
    Argument _caller of ICallFacet.sol.canCall is not verified to be != 0
    Argument _receiver of IERC20Facet.sol.mint is not verified to be != 0
    Argument _from of IERC20Facet.sol.burn is not verified to be != 0
    Argument _spender of IERC20Facet.sol.increaseApproval is not verified to be != 0
    Argument _spender of IERC20Facet.sol.decreaseApproval is not verified to be != 0
    Argument tokenA of IUniswapV2Factory.sol.getPair is not verified to be != 0
    Argument tokenB of IUniswapV2Factory.sol.getPair is not verified to be != 0
    Argument tokenA of IUniswapV2Factory.sol.createPair is not verified to be != 0
    Argument tokenB of IUniswapV2Factory.sol.createPair is not verified to be != 0
    Argument None of IUniswapV2Factory.sol.setFeeTo is not verified to be != 0
    Argument None of IUniswapV2Factory.sol.setFeeToSetter is not verified to be != 0
    Argument owner of IUniswapV2Pair.sol.balanceOf is not verified to be != 0
    Argument owner of IUniswapV2Pair.sol.allowance is not verified to be != 0
    Argument spender of IUniswapV2Pair.sol.allowance is not verified to be != 0
    Argument spender of IUniswapV2Pair.sol.approve is not verified to be != 0
    Argument to of IUniswapV2Pair.sol.transfer is not verified to be != 0
    Argument from of IUniswapV2Pair.sol.transferFrom is not verified to be != 0
    Argument to of IUniswapV2Pair.sol.transferFrom is not verified to be != 0
    Argument owner of IUniswapV2Pair.sol.nonces is not verified to be != 0
    Argument owner of IUniswapV2Pair.sol.permit is not verified to be != 0
    Argument spender of IUniswapV2Pair.sol.permit is not verified to be != 0
    Argument to of IUniswapV2Pair.sol.mint is not verified to be != 0
    Argument to of IUniswapV2Pair.sol.burn is not verified to be != 0
    Argument to of IUniswapV2Pair.sol.swap is not verified to be != 0
    Argument to of IUniswapV2Pair.sol.skim is not verified to be != 0
    Argument None of IUniswapV2Pair.sol.initialize is not verified to be != 0
    Argument None of IUniswapV2Pair.sol.initialize is not verified to be != 0
    Argument _INTERMEDIATE_TOKEN of EthSingleTokenJoin.sol.constructor is not verified to be != 0
    Argument _uniSwapLikeRouter of EthSingleTokenJoin.sol.constructor is not verified to be != 0
    Argument _INTERMEDIATE_TOKEN of EthSingleTokenJoinV2.sol.constructor is not verified to be != 0
    Argument _uniSwapLikeRouter of EthSingleTokenJoinV2.sol.constructor is not verified to be != 0
    Argument _INTERMEDIATE_TOKEN of SingleNativeTokenExit.sol.constructor is not verified to be != 0
    Argument _uniSwapLikeRouter of SingleNativeTokenExit.sol.constructor is not verified to be != 0
    Argument spender of SingleNativeTokenExit.sol._maxApprove is not verified to be != 0
    Argument _INTERMEDIATE_TOKEN of SingleNativeTokenExitV2.sol.constructor is not verified to be != 0
    Argument _uniSwapLikeRouter of SingleNativeTokenExitV2.sol.constructor is not verified to be != 0
    Argument spender of SingleNativeTokenExitV2.sol._maxApprove is not verified to be != 0
    Argument _INTERMEDIATE_TOKEN of SingleTokenJoin.sol.constructor is not verified to be != 0
    Argument _uniSwapLikeRouter of SingleTokenJoin.sol.constructor is not verified to be != 0
    Argument spender of SingleTokenJoin.sol._maxApprove is not verified to be != 0
    Argument _INTERMEDIATE_TOKEN of SingleTokenJoinV2.sol.constructor is not verified to be != 0
    Argument _uniSwapLikeRouter of SingleTokenJoinV2.sol.constructor is not verified to be != 0
    Argument spender of SingleTokenJoinV2.sol._maxApprove is not verified to be != 0
    Argument predicateProxy_ of MintableERC20.sol.initialize is not verified to be != 0
    Argument account of MintableERC20.sol.mint is not verified to be != 0
    Argument childChainManager_ of PolygonERC20Wrapper.sol.initialize is not verified to be != 0
    Argument user of PolygonERC20Wrapper.sol.deposit is not verified to be != 0
    Argument recipient of PolygonERC20Wrapper.sol.withdrawTo is not verified to be != 0
    Argument reciver of IBridgeToken.sol.withdrawTo is not verified to be != 0
    Argument user of IBridgeToken.sol.deposit is not verified to be != 0
    Argument reciver of IBridgeToken.sol.mint is not verified to be != 0
    Argument reciver of IPolygonERC20Wrapper.sol.withdrawTo is not verified to be != 0
@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Dec 14, 2021
code423n4 added a commit that referenced this issue Dec 14, 2021
@0xleastwood
Copy link
Collaborator

Disagree, there is no direct security risk that has been outlined. This is informational and non-critical.

@0xleastwood 0xleastwood added 0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation and removed 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments labels Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants