ENS Contest - Aymen0909'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: 29/59

Findings: 1

Award: $59.79

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

59.7928 USDC - $59.79

Labels

bug
grade-b
low quality report
QA (Quality Assurance)
Q-16

External Links

QA Report

Summary

IssueRiskInstances
1Immutable state variables lack zero address checksLow6
2Named return variables not used anywhere in the functionsNC4
3Constant redefined elsewhereNC2
4Unsed importsNC1

Findings

1- Immutable state variables lack zero address checks :

Constructors should check the values written in an immutable state variables(address) is not the address(0).

Risk : Low
Proof of Concept

Instances include:

File: DNSRegistrar.sol Line 62-64

previousRegistrar = _previousRegistrar; resolver = _resolver; oracle = _dnssec;

File: DNSRegistrar.sol Line 67

ens = _ens;

File: OffchainDNSResolver.sol Line 44-45

ens = _ens; oracle = _oracle;
Mitigation

Add non-zero address checks in the constructors for the instances aforementioned.

2- Adding a return statement when the function defines a named return variable, is redundant :

Risk : Non critical
Proof of Concept

Instances include:

File: DNSRegistrar.sol Line 204

File: BytesUtils.sol Line 183

File: DNSSECImpl.sol Line 127

File: DNSSECImpl.sol Line 173

Mitigation

Either use the named return variables inplace of the return statement or remove them.

3- Constant redefined elsewhere :

Consider defining in only one contract so that values cannot become out of sync when only one location is updated. A cheap way to store constants in a single location is to create an internal constant in a library. .

Risk : Non critical
Proof of Concept

Instances include:

File: DNSClaimChecker.sol Line 16-17

File: OffchainDNSResolver.sol Line 29-30

uint16 constant CLASS_INET = 1; uint16 constant TYPE_TXT = 16;

4- Unused imports :

Contracts or libraries that are imported and not used should be removed.

Risk : Non critical
Proof of Concept

Instances include:

File: DNSClaimChecker.sol Line 4

import "../dnssec-oracle/DNSSEC.sol";

#0 - c4-pre-sort

2023-05-02T04:31:31Z

thereksfour marked the issue as low quality report

#1 - thereksfour

2023-05-02T04:31:34Z

only L1

#2 - c4-judge

2023-05-09T09:56:36Z

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