Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Latest commit

 

History

History
65 lines (55 loc) · 7.33 KB

040.md

File metadata and controls

65 lines (55 loc) · 7.33 KB

Bnke0x0

low

Missing checks for address(0x0) when assigning values to address state variables

Summary

Vulnerability Detail

Impact

Missing checks for address(0x0) when assigning values to address state variables

Code Snippet

https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/L1CrossDomainMessenger.sol#L31 => PORTAL = _portal; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/L2OutputOracle.sol#L93 => SUBMISSION_INTERVAL = _submissionInterval; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/L2OutputOracle.sol#L94 => L2_BLOCK_TIME = _l2BlockTime; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/L2OutputOracle.sol#L95 => PROPOSER = _proposer; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/L2OutputOracle.sol#L96 => CHALLENGER = _challenger; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/L2OutputOracle.sol#L116 => startingTimestamp = _startingTimestamp; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/L2OutputOracle.sol#L117 => startingBlockNumber = _startingBlockNumber; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/OptimismPortal.sol#L120 => L2_ORACLE = _l2Oracle; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/OptimismPortal.sol#L121 => FINALIZATION_PERIOD_SECONDS = _finalizationPeriodSeconds; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/OptimismPortal.sol#L319 => l2Sender = _tx.sender; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/SystemConfig.sol#L121 => overhead = _overhead; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/SystemConfig.sol#L122 => scalar = _scalar; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/SystemConfig.sol#L123 => batcherHash = _batcherHash; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/SystemConfig.sol#L124 => gasLimit = _gasLimit; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/SystemConfig.sol#L149 => batcherHash = _batcherHash; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/SystemConfig.sol#L162 => overhead = _overhead; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/SystemConfig.sol#L163 => scalar = _scalar; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L1/SystemConfig.sol#L197 => gasLimit = _gasLimit; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L2/L1Block.sol#L94 => number = _number; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L2/L1Block.sol#L95 => timestamp = _timestamp; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L2/L1Block.sol#L96 => basefee = _basefee; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L2/L1Block.sol#L97 => hash = _hash; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L2/L1Block.sol#L98 => sequenceNumber = _sequenceNumber; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L2/L1Block.sol#L99 => batcherHash = _batcherHash; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L2/L1Block.sol#L100 => l1FeeOverhead = _l1FeeOverhead; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L2/L1Block.sol#L101 => l1FeeScalar = _l1FeeScalar; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/L2/L2ERC721Bridge.sol#L100 => remoteToken == _remoteToken, https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/deployment/PortalSender.sol#L21 => PORTAL = _portal; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/deployment/SystemDictator.sol#L149 => config = _config; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/deployment/SystemDictator.sol#L163 => l2OutputOracleDynamicConfig = _l2OutputOracleDynamicConfig; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/legacy/DeployerWhitelist.sol#L94 => owner = _owner; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/ERC721Bridge.sol#L85 => OTHER_BRIDGE = _otherBridge; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/FeeVault.sol#L42 => MIN_WITHDRAWAL_AMOUNT = _minWithdrawalAmount; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/FeeVault.sol#L43 => RECIPIENT = _recipient; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/OptimismMintableERC20.sol#L63 => REMOTE_TOKEN = _remoteToken; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/OptimismMintableERC20.sol#L64 => BRIDGE = _bridge; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/OptimismMintableERC20Factory.sol#L52 => BRIDGE = _bridge; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/OptimismMintableERC721.sol#L68 => REMOTE_CHAIN_ID = _remoteChainId; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/OptimismMintableERC721.sol#L69 => REMOTE_TOKEN = _remoteToken; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/OptimismMintableERC721.sol#L70 => BRIDGE = _bridge; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/OptimismMintableERC721Factory.sol#L47 => BRIDGE = _bridge; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/OptimismMintableERC721Factory.sol#L48 => REMOTE_CHAIN_ID = _remoteChainId; https://github.com/sherlock-audit/2023-01-optimism/blob/main/optimism/packages/contracts-bedrock/contracts/universal/ProxyAdmin.sol#L131 => upgrading = _upgrading;

Tool used

Manual Review

Recommendation

Consider adding zero-address checks in the mentioned codebase.