The cancel, burn, and withdraw functions rely on the _isCallerStreamRecipientOrApproved function to verify whether the caller (msg.sender) is authorized to perform the action. However, _isCallerStreamRecipientOrApproved does not explicitly check if the recipient (owner) or the operator exists. This oversight can lead to scenarios where approvals are set for non-existent addresses, causing potential security risks.
Checking approval for a non-existent owner.
Checking approval for a non-existent operator.
Checking approval for zero address as owner or operator.
The function may return false for non-existent addresses, which is generally safe but can lead to confusion or unexpected behavior.
If the contract logic assumes the existence of an owner or operator without validation, it could potentially be exploited in edge cases or during complex interactions.
Manual review
Implement explicit checks to ensure that both the owner and operator addresses exist before performing approval checks. This can be done by verifying that the addresses are not zero and that they are valid within the context of the contract.
Here is an example function that implements the various checks
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.