mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Kenny MacDermid <kenny@macdermid.ca>
To: musl@lists.openwall.com
Subject: Re: [musl] lookup_name issue with search domains
Date: Mon, 5 Dec 2022 16:11:51 -0400	[thread overview]
Message-ID: <20221205201151.f6vr3hvi62x2lvwv@localhost> (raw)
In-Reply-To: <20221205132604.GW29905@brightrain.aerifal.cx>

On Mon, Dec 05, 2022 at 08:26:05AM -0500, Rich Felker wrote:
> As an analogy, you could imagine a DNS provider adding some sort of
> TXT records to every name in your zone.  Nothing about DNS says they
> can't -- these are valid records that can exist anywhere -- but they'd
> be serving something different than what you asked them to.
> 
> In this case, Cloudflare is effectively making *every possible* name
> under your zone exist, but with no RRs defined for it unless you
> provided some. This is contrary to your intent that names you didn't
> define simply not exist.

Thank you for all the information Rich. I'm in no way trying to be
argumentative here, and am not claiming to be a DNS expert. I'm just
trying to provide another view of the issue.

In providing a different perspective I think the analogy is a good place
to start. Let's say we take it a bit further and say it wasn't the DNS
provider changing things. Say I added an MX record to a domain.

The API that's in question is called `gethostbyname*`. It's not getTXT,
or getMX or anything like that. When calling that I don't care if a name
exists, I care if a host exists. As such I expect the API to only look
at host records (and possibly dnssec that protect them). I wouldn't
really care if there was 10 odd new record types, if there's no host
records then there's no host at that name.

From my understanding of what you're saying: if the query response
doesn't contain error flags , it's indicating the name exists. That's
fine, the name exists. That doesn't mean the host exists. The response
that comes back has zero 'Answer RRs'. If searching should now stop
because the host was found, what's it's address?

Reading a Linux man page on `resolv.conf` it says of the "Search list
for host-name lookup":

>> Resolver queries having fewer than ndots dots (default is 1) in them
>> will be attempted using each component of the search path in turn
>> until a match is found.

In the case where I have 3 search list entries, has a host match been
found because the second domain has an MX record? It doesn't seem like
it to me.

From a glance for empty answers in RFC1034 I see section 6.2.4 has:

NAME=SRI-NIC.ARPA, QTYPE=NS

This query could return without any error but the RFC says:

>> The only difference between the response and the query is the AA and
>> RESPONSE bits in the header.  The interpretation of this response is
>> that the server is authoritative for the name, and the name exists,
>> but no RRs of type NS are present there.

That sounds to me like what Cloudflare is doing. They're saying they're
the authority for the name, and no A records exist.

So I guess it comes down to the question: Does this match a host?

  reply	other threads:[~2022-12-05 20:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-04  4:02 Kenny MacDermid
2022-12-04  5:45 ` Markus Wichmann
2022-12-04 15:31   ` Rich Felker
2022-12-04 23:04     ` Kenny MacDermid
2022-12-05 13:26       ` Rich Felker
2022-12-05 20:11         ` Kenny MacDermid [this message]
2022-12-05 22:25           ` Quentin Rameau
2022-12-06  5:19             ` Kenny MacDermid
2022-12-06  9:57               ` Quentin Rameau

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=20221205201151.f6vr3hvi62x2lvwv@localhost \
    --to=kenny@macdermid.ca \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).