Submitted by PwnedNoMore
NameWrapper.sol#L504
NameWrapper.sol#L356
By design, the child nodes expiry can only be extended up to the parents current one. Adding these restrictions means that the ENS users only have to look at the name itselfs fuses and expiry (without traversing the hierarchy) to understand what guarantees the users have.
When a parent node tries to setSubnodeOwner / setSubnodeRecord, the following code is used to guarantee that the new expiry can only be extended up to the current one.
However, the problem shows when
The point here is that the oldExpiry will be set as 0 when unwrapping the node even it holds child nodes, relaxing the constraint.
Specifically, considering the following scenario
The root cause seems that we should not zero out the expiry when burning a node if the node holds any subnode.
For full details, please see original warden submission.
Arachnid (ENS) confirmed
