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

Owner should not be able to renounce ownership #48

Closed
code423n4 opened this issue Dec 14, 2022 · 3 comments
Closed

Owner should not be able to renounce ownership #48

code423n4 opened this issue Dec 14, 2022 · 3 comments
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working unsatisfactory does not satisfy C4 submission criteria; not eligible for awards

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-12-forgeries/blob/fc271cf20c05ce857d967728edfb368c58881d85/src/ownable/OwnableUpgradeable.sol#L114-L116

Vulnerability details

Impact

The VRFNFTRandomDraw contract inherits from the OwnableUpgradable contract which gives the contract owner the ability to renounce ownership of the contract as seen here https://github.com/code-423n4/2022-12-forgeries/blob/fc271cf20c05ce857d967728edfb368c58881d85/src/ownable/OwnableUpgradeable.sol#L114-L116.

The VRFNFTRandomDraw contract heavily relies on the owner to perform critical operations including calling startDraw (), redraw() and also lastResortTimelockOwnerClaimNFT () functions. If the ownership of the contract at some point is resigned then these operations would not be possible

Proof of Concept

https://github.com/code-423n4/2022-12-forgeries/blob/fc271cf20c05ce857d967728edfb368c58881d85/src/ownable/OwnableUpgradeable.sol#L114-L116

Tools Used

Recommended Mitigation Steps

Consider removing the ability of the owner to renounce ownership via the resignOwnership () function

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Dec 14, 2022
code423n4 added a commit that referenced this issue Dec 14, 2022
@c4-judge c4-judge added the unsatisfactory does not satisfy C4 submission criteria; not eligible for awards label Dec 17, 2022
@c4-judge
Copy link
Contributor

gzeon-c4 marked the issue as unsatisfactory:
Invalid

@neumoxx
Copy link

neumoxx commented Jan 11, 2023

Hi @gzeon-c4, resignOwnership is a function available to call in the contract, and can lead to loss of NFTs, I don't see why you marked the issue as unsatisfactory.

@gzeoneth
Copy link
Member

This is not an issue because it have the same effect as if the owner decided to do nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working unsatisfactory does not satisfy C4 submission criteria; not eligible for awards
Projects
None yet
Development

No branches or pull requests

4 participants