Sablier

Sablier
DeFiFoundry
53,440 USDC
View results
Submission Details
Severity: low
Invalid

Missing Checks for `address(0x0)` When Assigning Values to Address State Variables

Summary

The issue involves the assignment of values to address state variables without preceding checks to ensure that the assigned value isn't address(0x0). This can lead to unexpected behavior, especially considering that address(0x0) typically represents an uninitialized address.

Vulnerability Details

In the Adminable.sol contract, the admin state variable is assigned a new value without checking if the new value is address(0x0).

36 admin = newAdmin;

Impact

Assigning address(0x0) to an address state variable without proper checks can lead to unexpected behavior. It may cause the contract to interact with an unintended contract or result in unforeseen logic execution.

Tools Used

  • Manual code review

Recommendations

  • Implement Check for address(0x0): Before assigning a new value to an address state variable, include a check to ensure that the new value is not address(0x0). This helps prevent unintended consequences and ensures that the contract behaves as expected.

Example:

require(newAdmin != address(0), "Cannot assign the zero address as admin");
admin = newAdmin;
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Info/Gas/Invalid as per Docs

https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.