ENS Contest - 0x73696d616f's results

Decentralised naming for web3

General Information

Platform: Code4rena

Start Date: 14/04/2023

Pot Size: $90,500 USDC

Total HM: 7

Participants: 59

Period: 14 days

Judge: LSDan

Total Solo HM: 3

Id: 232

League: ETH

ENS

Findings Distribution

Researcher Performance

Rank: 36/59

Findings: 1

Award: $59.79

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

[L-01] missing zero address checks

The most concerning address is ens, although no actual change will me made on the real ens address, users will still spend significant amounts of gas. The other addresses will in the worst case scenario only make the transactions revert.

Ocurrences

DNSRegistrar.sol , constructor()
  • previousRegistrar = _previousRegistrar;
  • resolver = _resolver;
  • oracle = _dnssec;
  • suffixes = _suffixes;
  • ens = _ens;
DNSRegistrar.sol , setPublicSuffixList(...)
  • suffixes = _suffixes;
DNSSECImpl.sol, setAlgorithm(...)
  • algorithms[id] = algo;
DNSSECImpl.sol, setDigest(...)
  • digests[id] = digest;

Mitigation

Do zero address or code checks.

[L-02] missing anchor zero bytes check at DNSSECImpl.sol, constructor

anchors = _anchors; Would lead to InvalidProofType when trying to prove and claim, wasting gas.

[NC-01] DNSRegistrar.sol memory variables with same names as storage variables in proveAndClaimWithResolver(...)

proveAndClaimWithResolver(...)

The argument address resolver and the storage variable address public immutable resolver; have the same name.

Mitigation

Add a prefix _ to the memory resolver as in the rest of the codebase.

[NC-02] BytesUtils.sol variables not in camel case

[NC-03] Add custom errors (or reason strings if prefered) to help debugging

BytesUtils

RRUtils

[NC-04] DNSSECImpl snake case owner_only different than the usual camel case in the codebase

https://github.com/code-423n4/2023-04-ens/blob/main/contracts/dnssec-oracle/Owned.sol#L9 In setAlgorithm(...) and setDigest(...)

[NC-05] now is the name of the deprecated keyword for block.timestamp

[NC-06] mock contracts such as DummyAlgorithm.sol should be under mocks folder

This is the case for mocks under the folder dnsregistrar. DummyAlgorithm

#0 - c4-judge

2023-05-08T15:38:54Z

dmvt marked the issue as grade-b

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter