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

Missing zero checks at multiple places #267

Closed
code423n4 opened this issue Feb 3, 2022 · 1 comment
Closed

Missing zero checks at multiple places #267

code423n4 opened this issue Feb 3, 2022 · 1 comment
Labels
0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation bug Something isn't working duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Handle

0v3rf10w

Vulnerability details

Impact

Missing zero checks at multiple places

Proof of Concept

Adminable.setPendingAdmin(address).newPendingAdmin (contracts/Adminable.sol#27) lacks a zero-check on :
                - pendingAdmin = newPendingAdmin (contracts/Adminable.sol#31)
DexAggregatorDelegator.constructor(address,address,address,address).implementation_ (contracts/dex/DexAggregatorDelegator.sol#14) lacks a zero-check on :
                - implementation = implementation_ (contracts/dex/DexAggregatorDelegator.sol#22)
DexAggregatorDelegator.constructor(address,address,address,address).admin_ (contracts/dex/DexAggregatorDelegator.sol#13) lacks a zero-check on :
                - admin = admin_ (contracts/dex/DexAggregatorDelegator.sol#24)
DexAggregatorDelegator.setImplementation(address).implementation_ (contracts/dex/DexAggregatorDelegator.sol#31) lacks a zero-check on :
                - implementation = implementation_ (contracts/dex/DexAggregatorDelegator.sol#33)
XOLE.setDev(address).newDev (contracts/XOLE.sol#172) lacks a zero-check on :
                - dev = newDev (contracts/XOLE.sol#173)
XOLE.delegateBySigs(address,uint256[],uint256[],uint8[],bytes32[],bytes32[]).delegatee (contracts/XOLE.sol#360) lacks a zero-check on :
                - (success) = address(this).call(abi.encodeWithSelector(XOLE(address(this)).delegateBySig.selector,delegatee,nonce[i],expiry[i],v[i],r[i],s[i])) (contracts/XOLE.sol#363-365)
GovernorAlpha.constructor(address,address,address).guardian_ (contracts/gov/GovernorAlpha.sol#141) lacks a zero-check on :
                - guardian = guardian_ (contracts/gov/GovernorAlpha.sol#144)
Timelock.constructor(address,uint256).admin_ (contracts/gov/Timelock.sol#32) lacks a zero-check on :
                - admin = admin_ (contracts/gov/Timelock.sol#36)
Timelock.setPendingAdmin(address).pendingAdmin_ (contracts/gov/Timelock.sol#67) lacks a zero-check on :
                - pendingAdmin = pendingAdmin_ (contracts/gov/Timelock.sol#74)
Timelock.executeTransaction(address,uint256,string,bytes,uint256).target (contracts/gov/Timelock.sol#117) lacks a zero-check on :
                - (success,returnData) = target.call{value: value}(callData) (contracts/gov/Timelock.sol#137)

Recommended Mitigation Steps

Add respective checks

@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 Feb 3, 2022
code423n4 added a commit that referenced this issue Feb 3, 2022
@ColaM12 ColaM12 added the duplicate This issue or pull request already exists label Feb 3, 2022
@ColaM12
Copy link
Collaborator

ColaM12 commented Feb 3, 2022

Duplicate to #57

@ColaM12 ColaM12 closed this as completed Feb 3, 2022
@0xleastwood 0xleastwood added invalid This doesn't seem right 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 invalid This doesn't seem right labels Feb 19, 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 duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants