Submitted by zzzitron
https://github.com/code-423n4/2022-11-ens/blob/2b0491fee2944f5543e862b1e5d223c9a3701554/contracts/wrapper/NameWrapper.sol#L512
https://github.com/code-423n4/2022-11-ens/blob/2b0491fee2944f5543e862b1e5d223c9a3701554/contracts/wrapper/NameWrapper.sol#L550
Below is a snippet of the proof of concept. The whole code can be found in this gist. And how to run test is in the comment in the gist.
In the proof of concept below, the parent node is vitalik.eth and the child node is sub1.vitalik.eth.
The parent node has PARENT_CANNOT_CONTROL, IS_DOT_ETH and CANNOT_UNWRAP and the child node has PARENT_CANNOT_CONTROL.
The child node unwraps itself and set the owner on ens contract to the address(0) or address(ens), which will make the child node to unregistered state even before expiry of the node.
Since technically the child node is unregistered, the parent can now create the unregistered node sub1.vitalik.eth by simply calling setSubnodeRecord. By doing so, the parent can take control over the child node, even though the PARENT_CANNOT_CONTROL fuse was set and it was before expiry.
It is unlikely that the child node will set the owner of the ENS Registry to zero. But hypothetically, the owner of the child node wanted to burn the subnode thinking that no one can use it until the expiry. In that case the owner of the parent node can just take over the child node.
foundry
Unclear, but consider using ENS.recordExists instead of checking the ENS.owner.
jefflau (ENS) confirmed
Alex the Entreprenerd (judge) commented:
csanuragjain (warden) commented:
For this audit, 3 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by zzzitron received the top score from the judge.
The following wardens also submitted reports: izhuer and csanuragjain.
