Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ownerOf function requires checking if the owner is non-zero. #62

Open
code423n4 opened this issue Apr 30, 2021 · 0 comments
Open

The ownerOf function requires checking if the owner is non-zero. #62

code423n4 opened this issue Apr 30, 2021 · 0 comments
Labels
1 (Low Risk) bug Something isn't working

Comments

@code423n4
Copy link
Contributor

Handle

shw

Vulnerability details

Impact

According to the eip-721 standard, the function ownerOf should throw if the owner is a zero address. However, this check is not implemented in the Beebots contract.

Proof of Concept

Referenced code:
(Beebots.sol#L285-L287)[https://github.com/code-423n4/2021-04-redacted/blob/main/Beebots.sol#L285-L287]

Tools Used

None

Recommended Mitigation Steps

Add a check require(owner != address(0)) after line 286 with proper revert message.

@code423n4 code423n4 added 1 (Low Risk) bug Something isn't working labels Apr 30, 2021
code423n4 added a commit that referenced this issue Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant