From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5396 invoked from network); 2 Sep 2022 08:09:36 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 2 Sep 2022 08:09:36 -0000 Received: (qmail 28537 invoked by uid 550); 2 Sep 2022 08:09:33 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 28505 invoked from network); 2 Sep 2022 08:09:33 -0000 Date: Fri, 2 Sep 2022 08:09:00 +0000 From: Luca BRUNO To: musl@lists.openwall.com Message-ID: <20220902080900.0291d2c8@ephyra> In-Reply-To: <20220901180153.GB21934@brightrain.aerifal.cx> References: <20220831235914.GA19125@brightrain.aerifal.cx> <20220901124512.GA21934@brightrain.aerifal.cx> <20220901160318.67d15b3f@ephyra> <20220901180153.GB21934@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [musl] musl resolver handling of "search ." in /etc/resolv.conf On Thu, 1 Sep 2022 14:01:53 -0400 Rich Felker wrote: > > From my observations, option 1 is consistent with other libc's > > behavior. But it has the above caveat that it needs additional > > caching to avoid duplicate root-queries on negative responses. > > If it isn't too invasive to implement, that would be my preferred > > one. > > I'm not clear what additional caching you have in mind. AFAICT the > search loop can just set a flag if it searched root already, and the > final root query can be skipped if it's reached and the flag is set. Yes sorry, poor choice of wording from my side, that was the additional logic I was hinting to. For future reference, this bug was observed in the wild due to a combination of recent systemd (>= v247) and kubernetes (= 1.25.0). The on-host systemd behavior is on purpose, while the logic on kubernetes side was not completely expected. A bugfix for kubernetes is being assembled right now to avoid triggering this case, see https://github.com/kubernetes/kubernetes/pull/112157. But the same situation may crop up with other non-kubernetes runtimes, if they try to blindly forward/merge the "search ." from the host environment. Ciao, Luca