-
Notifications
You must be signed in to change notification settings - Fork 0
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
Unpriveleged user cannot renew fuse expiry #223
Comments
This is a duplicate, but the proof of concept is related to subdomains, not .eth domains. |
In fact, this should only be severity QA, as it can be worked around by calling |
This report is invalid as it does not deal with a second, but a third level domain in the example. Third level domains (subdomains) are not renewed in this way. |
In my POC, I have outlined two scenarios, although it looks a bit strange due to the way GitHub deals with hashtags, the second does deal with second level domains. |
Alice can renew her domain by calling |
Lines of code
https://github.com/code-423n4/2022-07-ens/blob/ff6e59b9415d0ead7daf31c2ed06e86d9061ae22/contracts/wrapper/NameWrapper.sol#L271-L275
Vulnerability details
Impact
The
renew()
function in NameWrapper.sol is only authorised to be called by a controller. This means that it is impossible for a user to renew their fuse expiry as EthRegistrarController.sol does not make a call toNameWrapper.renew()
. Therefore when a user's subdomain fuse expires, it allows for the parent to transfer away the subdomain without the user's permission thereby breaking the trustless nature of the protocolProof of Concept
Scenario #1:
Scenario Gas Optimizations #2:
Tools Used
VS Code
Recommended Mitigation Steps
In the
renew()
method call in EthRegistrarController.sol, add a call torenew()
in NameWrapper.sol. Then make sure to remove one of the calls toregistrar.renew()
so that you don't increase the duration of the domain name by more than expectedThe text was updated successfully, but these errors were encountered: