Bug 1761888

Summary: glibc: domain name resolver should not search names with dots
Product: Red Hat Enterprise Linux 8 Reporter: Petr Menšík <pemensik>
Component: glibcAssignee: Florian Weimer <fweimer>
Status: CLOSED UPSTREAM QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: ashankar, codonell, dj, fweimer, mnewsome, pfrankli
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 16:41:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Menšík 2019-10-15 13:59:59 UTC
Description of problem:
After bind rebase to latest ESV 9.11, bug #1743572 was reported. bind-utils changed behavior and no longer tries search suffixes to names containing dot.

That change was intentional and upstream does not want to revert back to original behaviour. Instead, they provided me link to research document [1], which recommends avoiding searches on names, when it is unclear it is considered absolute or not. Modern systems release follow recommendation by ICANN.

I think we should consider changing behaviour in glibc, even it may break backward compatibility. Now, we are in inconsistent state, where system resolver behaves different way than DNS tools. According to [1], recent Windows system behaves the same way as bind-utils. I think we should follow, maybe with flag for backward compatibility in options

Version-Release number of selected component (if applicable):
glibc-2.28-72.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1. use some search in /etc/resolv.conf
2. dig +showsearch nx.test
3. getent hosts nx.test

Actual results:
2. does not use search
3. uses search

Expected results:
2. does not use search
3. does not use search

Additional info:

It is considered best practice to use search only on unqualified names (without dots). Lowers number of invalid queries to root servers and lowers chance someone on public internet could spoof internal only site.

1. https://www.icann.org/en/groups/ssac/documents/sac-064-en.pdf

Comment 2 Florian Weimer 2019-10-29 15:33:12 UTC
I looked at this quite some time ago and the conclusion back then was that there is no reliable way to turn of search list processing for dotted names, or not have a search path at all (while still blocking TLD lookups). This needs some upstream work to get fixed.

Comment 3 Carlos O'Donell 2019-10-29 16:12:02 UTC
(In reply to Florian Weimer from comment #2)
> I looked at this quite some time ago and the conclusion back then was that
> there is no reliable way to turn of search list processing for dotted names,
> or not have a search path at all (while still blocking TLD lookups). This
> needs some upstream work to get fixed.

Could you please file an upstream bug? Then we'll close this CLOSED/UPSTREAM and track.