Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221206051939.hsse4vffoaeb3uqu@localhost>
Date: Tue, 6 Dec 2022 01:19:39 -0400
From: Kenny MacDermid <kenny@...dermid.ca>
To: musl@...ts.openwall.com
Subject: Re: lookup_name issue with search domains

On Mon, Dec 05, 2022 at 11:25:06PM +0100, Quentin Rameau wrote:
> Hi Kenny,
> 
> > 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.
> 
> Indeed, and that's what you get there.
> The DNS server is telling you it's authoritative
> (you'll get no better different answer from somebody else),
> the name exists, but its without an (IPv4) address.

The name exists, yes, but does the _host_ exist?

> Searching ends there because the host was found by name,
> and the server said it doesn't have an associated address.

Except a host wasn't found, just the name. To put an example to it,
please point to the host that is 'notahost.macdermid.ca'. There is a
TXT record for that domain name, yet I don't see how that creates a host.

> > So I guess it comes down to the question: Does this match a host?
> 
> This matches a host, with no configured AF_INET address.

That would only be the case if we considered every domain name a host.
I haven't found anything that specifies that particular limitation on
DNS. If anything it seems MX records would be a counter-example. Also
from RFC 1034:

>>> We should be able to use names to retrieve host addresses, mailbox
>>> data, and other as yet undetermined information.  All data
>>> associated with a name is tagged with a type, and queries can be
>>> limited to a single type.

Note it doesn't say 'data associated with a host'.

I hope you don't feel I'm just being pedantic here. I'm simply trying to
explain how we see domains names differently, and why I don't understand
this particular difference between libc implementations.

To me I own a domain and can create records in that domain. If I happen
to point some names at hosts using A/AAA records, great. If other names
have TXT, MX, or some other record type, well I don't feel I've created
a host-missing-an-A/AAAA.

And maybe I'm wrong. Maybe other libc's should be following musl and for
a name to exist automatically makes it a host (although in that case,
would musl be being pedantic in not supporting cloudflare?). Either way
hopefully you understand better why it's confusing to me, and why people
are bitten by this decision.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.