Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sun, 4 Dec 2022 00:02:54 -0400
From: Kenny MacDermid <>
Subject: lookup_name issue with search domains


I'm seeing an issue in resolving hosts when any resolv.conf search
domain returns a no-data response. In debugging I believe it's caused by
the check in network/lookup_name.c, line 225:

if (cnt) return cnt;

The code is looping through the search domains trying each one.
This works fine for some of my search domains because the DNS response
will have reply code flags set to 3, which causes name_from_dns() to
return 0.

The issue arises when it queries my cloudflare hosted domain (which also
uses dnssec). That query does not have the reply code flags set to 3.
Instead it's set to 0. This results in name_from_dns() returning

Because of the above mentioned check, this value is directly returned
and subsequent domains (and most importantly the domain without anything
appended) are not tested.

When I replaced the condition with `(cnt > 0)` it worked for me. I'm not
sure that's the best solution, but I also can't see a reason to stop
attempting to lookup the host because an unrelated host caused some

To add some context, this was seen in a golang program running on a
kind/Kubernetes cluster. In these clusters ndots is set to 5 so pretty
much every name is first checked against the search list. When using the
golang resolver with `GODEBUG=netdns=go` I do not see the same issue.

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.