public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manuel at mozilla dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug network/31413] New: getaddrinfo: DNS resolution fails if a CNAME target begins with a hyphen
Date: Mon, 26 Feb 2024 10:42:29 +0000	[thread overview]
Message-ID: <bug-31413-131@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=31413

            Bug ID: 31413
           Summary: getaddrinfo: DNS resolution fails if a CNAME target
                    begins with a hyphen
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: network
          Assignee: unassigned at sourceware dot org
          Reporter: manuel at mozilla dot com
  Target Milestone: ---

Clone of Firefox Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1870497

> 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.

In Firefox on Linux we use glibc getaddrinfo to resolve hostnames. I think
fixing this in glibc would be best.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2024-02-26 10:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 10:42 manuel at mozilla dot com [this message]
2024-02-26 10:43 ` [Bug network/31413] " manuel at mozilla dot com
2024-02-26 21:31 ` fw at deneb dot enyo.de
2024-02-27 11:07 ` fw at deneb dot enyo.de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31413-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).