Sablier

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

SablierV2Lockup : notNull(streamId) is missing for `getRecipient`

Summary

The check stream exists or not is not validated when calling the getRecipient function.

Vulnerability Details

https://github.com/Cyfrin/2024-05-Sablier/blob/43d7e752a68bba2a1d73d3d6466c3059079ed0c6/v2-core/src/abstracts/SablierV2Lockup.sol#L99-L107

function getEndTime(uint256 streamId) external view override notNull(streamId) returns (uint40 endTime) { --->> @@audit find - check present
endTime = _streams[streamId].endTime;
}
/// @inheritdoc ISablierV2Lockup
function getRecipient(uint256 streamId) external view override returns (address recipient) { -------->>@@ audit find - check absent
// Check the stream NFT exists and return the owner, which is the stream's recipient.
recipient = _requireOwned({ tokenId: streamId });
}

Impact

When the getRecipient is used front end application, it would lead to unexpected issues.

Tools Used

Manual review.

Recommendations

make sure to add the notNull(streamId) modifier for getRecipient function as well.

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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