Skip to content
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

Zone10 does not ignore case when comparing domain names #734

Closed
matsduf opened this issue May 15, 2020 · 1 comment · Fixed by #737
Closed

Zone10 does not ignore case when comparing domain names #734

matsduf opened this issue May 15, 2020 · 1 comment · Fixed by #737
Assignees
Labels
A-TestCase Area: Test case specification or implementation of test case T-Bug Type: Bug in software or error in test case description
Milestone

Comments

@matsduf
Copy link
Contributor

matsduf commented May 15, 2020

In Zone10, the owner name of the SOA record is compared with the zone name tested. The comparison should be done after neutralizing any case difference, which is not done in the implementation.

This issue does not only hit zones (domains) with capital letters in owner name of the SOA record in the zone file. It hits any domain if you enter the domain name with case setting than the SOA record has, e.g. testing "Afnic.fr" will give the same error.

$ zonemaster-cli --show_module --raw arpa --test ZONE/zone10
   1.54 ERROR     ZONE         ZONE:WRONG_SOA address=199.9.14.201; name=arpa.; ns=b.root-servers.net; owner=ARPA.
   1.57 ERROR     ZONE         ZONE:WRONG_SOA address=2001:500:200::b; name=arpa.; ns=b.root-servers.net; owner=ARPA.
   1.61 ERROR     ZONE         ZONE:WRONG_SOA address=192.33.4.12; name=arpa.; ns=c.root-servers.net; owner=ARPA.
   1.68 ERROR     ZONE         ZONE:WRONG_SOA address=2001:500:2::c; name=arpa.; ns=c.root-servers.net; owner=ARPA.
   1.83 ERROR     ZONE         ZONE:WRONG_SOA address=192.112.36.4; name=arpa.; ns=g.root-servers.net; owner=ARPA.
   6.88 ERROR     ZONE         ZONE:WRONG_SOA address=2001:500:12::d0d; name=arpa.; ns=g.root-servers.net; owner=ARPA.
   7.11 ERROR     ZONE         ZONE:WRONG_SOA address=2001:dc3::35; name=arpa.; ns=m.root-servers.net; owner=ARPA.
   7.14 ERROR     ZONE         ZONE:WRONG_SOA address=202.12.27.33; name=arpa.; ns=m.root-servers.net; owner=ARPA.

With some more details:

$zonemaster-cli --show_module --raw arpa --level DEBUG3 --test ZONE/zone10
   0.00 DEBUG     SYSTEM       SYSTEM:START_TIME string=2020-05-15 20:59:51 +0200; time_t=1589569191
   0.00 DEBUG     SYSTEM       SYSTEM:TEST_ARGS args=Zonemaster::Engine::Zone=HASH(0x56360be59e88); method=zone10; module=ZONE
   0.00 INFO      SYSTEM       SYSTEM:GLOBAL_VERSION version=v3.1.1
   0.00 DEBUG     SYSTEM       SYSTEM:DEPENDENCY_VERSION name=Zonemaster::LDNS; version=2.1.0
(...)
   2.15 DEBUG3    SYSTEM       SYSTEM:CACHED_RETURN packet=;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 46362
;; flags: qr aa ; QUERY: 1, ANSWER: 1, AUTHORITY: 12, ADDITIONAL: 13 
;; QUESTION SECTION:
;; arpa.        IN      SOA

;; ANSWER SECTION:
ARPA.   86400   IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2020051501 1800 900 604800 86400

;; AUTHORITY SECTION:
ARPA.   518400  IN      NS      c.root-servers.net.
ARPA.   518400  IN      NS      d.root-servers.net.
ARPA.   518400  IN      NS      h.root-servers.net.
ARPA.   518400  IN      NS      m.root-servers.net.
ARPA.   518400  IN      NS      b.root-servers.net.
ARPA.   518400  IN      NS      f.root-servers.net.
ARPA.   518400  IN      NS      e.root-servers.net.
ARPA.   518400  IN      NS      i.root-servers.net.
ARPA.   518400  IN      NS      g.root-servers.net.
ARPA.   518400  IN      NS      a.root-servers.net.
ARPA.   518400  IN      NS      l.root-servers.net.
ARPA.   518400  IN      NS      k.root-servers.net.

;; ADDITIONAL SECTION:
a.root-servers.net.     3600000 IN      A       198.41.0.4
b.root-servers.net.     3600000 IN      A       199.9.14.201
c.root-servers.net.     3600000 IN      A       192.33.4.12
d.root-servers.net.     3600000 IN      A       199.7.91.13
e.root-servers.net.     3600000 IN      A       192.203.230.10
f.root-servers.net.     3600000 IN      A       192.5.5.241
g.root-servers.net.     3600000 IN      A       192.112.36.4
h.root-servers.net.     3600000 IN      A       198.97.190.53
i.root-servers.net.     3600000 IN      A       192.36.148.17
k.root-servers.net.     3600000 IN      A       193.0.14.129
l.root-servers.net.     3600000 IN      A       199.7.83.42
m.root-servers.net.     3600000 IN      A       202.12.27.33
a.root-servers.net.     3600000 IN      AAAA    2001:503:ba3e::2:30

;; Query time: 31 msec
;; SERVER: 202.12.27.33
;; WHEN: Fri May 15 20:59:53 2020
;; MSG SIZE  rcvd: 512
   2.15 ERROR     ZONE         ZONE:WRONG_SOA address=202.12.27.33; name=arpa.; ns=m.root-servers.net; owner=ARPA.
   2.15 DEBUG     SYSTEM       SYSTEM:MODULE_CALL_END method=zone10; module=Zone
@matsduf matsduf added T-Bug Type: Bug in software or error in test case description A-TestCase Area: Test case specification or implementation of test case labels May 15, 2020
@matsduf matsduf added this to the v2020.1 milestone May 15, 2020
@matsduf matsduf modified the milestones: v2020.1, v2019.2.2 May 20, 2020
vlevigneron added a commit to vlevigneron/zonemaster-engine that referenced this issue May 20, 2020
@matsduf matsduf linked a pull request May 20, 2020 that will close this issue
@matsduf
Copy link
Contributor Author

matsduf commented May 20, 2020

Resolved by PR #737

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-TestCase Area: Test case specification or implementation of test case T-Bug Type: Bug in software or error in test case description
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants