Gravita-Protocol / Gravita-SmartContracts

GNU General Public License v3.0
48 stars 31 forks source link

[ACE-01S] Inexistent Sanitization of Input Addresses #369

Closed 0xfornax closed 1 year ago

0xfornax commented 1 year ago

ACE-01S: Inexistent Sanitization of Input Addresses

Type Severity Location
Input Sanitization AddressesConfigurable.sol:L37-L58, L60-L62, L64-L66

Description:

The linked function(s) accept address arguments yet do not properly sanitize them.

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:

function setCommunityIssuance(address _communityIssuance) public onlyOwner {
    communityIssuance = _communityIssuance;
}

Recommendation:

We advise some basic sanitization to be put in place by ensuring that each address specified is non-zero.

0xfornax commented 1 year ago

Fixed.