Omniscia Mitosis Audit
PolygonZkEvmBridgeAdapter Static Analysis Findings
PolygonZkEvmBridgeAdapter Static Analysis Findings
PZE-01S: Inexistent Sanitization of Input Address
Type | Severity | Location |
---|---|---|
Input Sanitization | PolygonZkEvmBridgeAdapter.sol:L15-L21 |
Description:
The linked function accepts an address
argument yet does not properly sanitize it.
Impact:
The presence of zero-value addresses, especially in constructor
implementations, can cause the contract to be permanently inoperable. These checks are advised as zero-value inputs are a common side-effect of off-chain software related bugs.
Example:
src/helpers/adapter/PolygonZkEvmBridgeAdapter.sol
15constructor(IPolygonZkEVMBridge _bridge, uint32 _destNetwork, bool _forceUpdateGlobalExitRoot) {16 bridge = _bridge;17
18 destNetwork = _destNetwork;19
20 forceUpdateGlobalExitRoot = _forceUpdateGlobalExitRoot;21}
Recommendation:
We advise some basic sanitization to be put in place by ensuring that the address
specified is non-zero.
Alleviation (58e8cc66dfa900c03c47df78f5170d9960005629):
The input bridge_
address argument of the PolygonZkEvmBridgeAdapter::_setBridge
function is adequately sanitized as non-zero in the latest in-scope revision of the codebase, addressing this exhibit.