Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 31 Mar 2018 10:22:32 -0700
From: Eric Pruitt <eric.pruitt@...il.com>
To: musl@...ts.openwall.com
Subject: Re: [PATCH v5] resolver: mitigate bad interactions concering
 inconsistent DNS search domains with ndots usage

On Sat, Mar 31, 2018 at 09:40:04AM +0000, William Pitcock wrote:
> In certain cases where the Kubernetes guest is configured with a clusterwide domain that is
> hosted by a certain large CDN provider (*ahem* Cloudflare), the resolver may process
> erroneous replies sent from that CDN provider that have an empty A/AAAA record set.
> [...]
> -	if ((abuf[0][3] & 15) == 0) return EAI_NONAME;
> +	if ((abuf[0][3] & 15) == 0) {
> +		/* A certain large CDN provider's DNS service erroneously responds to queries with
> +		 * a NOERROR(0) response code, while also returning an empty record set. Accordingly,
> +		 * check for this and handle it as we would an NXDOMAIN(3) if the record set is empty
> +		 * for both A and AAAA records. */
> +		if (nq == 2 && (ctx.recordcnt[0] + ctx.recordcnt[1]) == 0) return 0;
> +		else return EAI_NONAME;

If you're going to call out Cloudflare in the commit message, why not do
it in the code comment, too? If someone runs into this later without
having read this mailing list post and they're using a release copy of
musl (something without revision history like a tar ball), poorly
obscuring Cloudflare's name just adds unnecessary friction to debugging
the problem.

Eric

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.