DNS resolution fails if a CNAME target begins with a hyphen
Categories
(Core :: Networking: DNS, defect, P2)
Tracking
()
People
(Reporter: bugzilla.mozilla.simon, Unassigned)
References
Details
(Whiteboard: [necko-triaged])
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0
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:
The "cname5" hostname returns "Server Not Found".
The other names can be resolved and Firefox will connect to them.
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.
Comment 1•5 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Reporter | ||
Comment 2•5 months ago
|
||
All of these work in Chrome 120.0.6099.109 and Chromium 119.0.6045.159 (including the A names as URLs).
For testing, there's a list of links to hostnames set up like this at https://gist.github.com/nomis/e4d32435f199aeffbf64197dc55b5ba9.
Reporter | ||
Updated•5 months ago
|
Updated•5 months ago
|
Reporter | ||
Comment 4•5 months ago
|
||
This is not a duplicate of Bug 1870496. That bug is for Firefox on Android. This bug is for Firefox on Linux.
Updated•5 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Comment 5•3 months ago
|
||
I think we should file a bug in glibc - this behaviour comes from getaddrinfo.
Updated•3 months ago
|
Updated•3 months ago
|
Comment 6•3 months ago
|
||
What is your glibc version? We fixed it in upstream version 2.37, and backported it to the release branches up to and including glibc 2.34.
Reporter | ||
Comment 7•3 months ago
|
||
I'm using 2.31-0ubuntu9.14 (Ubuntu 20.04.6 LTS).
Testing with getaddrinfo() directly, it also happens on 2.35-0ubuntu3.6 (Ubuntu 22.04.3 LTS) so they've not applied any bug fixes. Fedora 39 (with 2.38) is ok.
Comment 8•3 months ago
|
||
Thanks, I suggest reporting this to the Ubuntu team then: https://bugs.launchpad.net/ubuntu/+source/glibc
Comment 9•3 months ago
|
||
This has been fixed in glibc at Bug 12154. Opened a bug at Ubuntu https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/2055302. This bug can be closed at any case.
Description
•