DNS resolution fails if any label in a CNAME target begins with a hyphen or an underscore
Categories
(Core :: Networking: DNS, defect, P3)
Tracking
()
People
(Reporter: bugzilla.mozilla.simon, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Steps to reproduce:
Set up the following DNS records:
www1.test A 192.0.2.1
_www2.test A 192.0.2.1
www3._www3.test A 192.0.2.1
www_4.test A 192.0.2.1
-www5.test A 192.0.2.1
www6.-www6.test A 192.0.2.1
cname1.test CNAME www1.test
cname2.test CNAME _www2.test
cname3.test CNAME www3._www3.test
cname4.test CNAME www_4.test
cname5.test CNAME -www5.test
cname6.test CNAME www6.-www6.test
Open all of the "cname1" to "cname6" hostnames as URLs in Firefox.
Actual results:
Only "cname1" and "cname4" can be resolved and Firefox will connect to them.
The other names will return "Address Not Found".
Expected results:
All of "cname1" to "cname6" can be resolved and Firefox will connect to them.
The hostnames used in CNAME targets (or chains of CNAME targets) should not be subject to the same validation as the hostname in the URL.
| Reporter | ||
Comment 1•2 years ago
|
||
All of these work in Chrome 120.0.6099.115 and Samsung Internet 23.0.1.1 (including the A names as URLs) on the same Android 14 device.
| Reporter | ||
Comment 2•2 years ago
|
||
For testing, there's a list of links to hostnames set up like this at https://gist.github.com/nomis/e4d32435f199aeffbf64197dc55b5ba9.
Comment 3•2 years ago
|
||
Just a guess: Maybe Firefox is using Android System's Resolver , and Chromium-based browsers are using there own dns resolver?
| Reporter | ||
Comment 4•2 years ago
|
||
Testing with /system/bin/ping produces the same results, so it does look like a bug in the Android resolver.
| Reporter | ||
Comment 5•2 years ago
|
||
The Android bug is here: https://issuetracker.google.com/issues/154694663
Bug 1630439 is the same issue but with trailing underscores.
Updated•2 years ago
|
Comment 6•2 years ago
|
||
Sending to the DNS component to answer comment 3 and triage accordingly.
Comment 7•2 years ago
|
||
(In reply to jackyzy823 from comment #3)
Just a guess: Maybe Firefox is using Android System's Resolver , and Chromium-based browsers are using there own dns resolver?
Yes, we are using Android System's Resolver.
Updated•2 years ago
|
Comment 9•2 years ago
|
||
Let's file a bug in Android/Bionic.
If the Java DNS API works but getaddrinfo doesn't we could consider moving to that (if it also has other benefits).
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Let's file a bug in Android/Bionic.
Putting the Bionic bug report from comment 5 into "See Also"
Description
•