Re: [DNSOP] Status of "let localhost be localhost"?

Ted Lemon <> Wed, 09 August 2017 16:45 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 9B7CA132423 for <>; Wed, 9 Aug 2017 09:45:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id HCbWX7sHLKV3 for <>; Wed, 9 Aug 2017 09:44:59 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:400e:c00::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 825DE132424 for <>; Wed, 9 Aug 2017 09:44:59 -0700 (PDT)
Received: by with SMTP id h68so30105058pfk.0 for <>; Wed, 09 Aug 2017 09:44:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=EwN0pabjg5y+hVmN3W7H63PJToMk1zS/W4vcY9Pcp5A=; b=xeSmiISEn99qn9B7eG+MC6Wxl9rLIDfHvi/6jxmwhFL59AWqzffDkU/EYKjHs8BnX1 X7ywKBUxLQeNOQaZgJfd3vo5ePi42tju03kK/uTSrnbkRKkSYqxvYQVWcJD4nzM5glpU xvC6pcfpnFRoE75AXV+ToeHfYarh5TOy9Rwlv982keS+Gz+d8w2NBtftVOGyK4GNoTDS vzZVXzHkSfQC+2rsgu3ehwKbjuCpEiZkHrMuSzlnqYQw+aTKKLQdaSa+IOj6loI6Kwt+ XXX8Hid23eLMuPBPtW4zkPQx1+IuiTg6SqYyt8Gv1yvgDkFoME0nD0W7DVsPQI9IWbRD XV4g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=EwN0pabjg5y+hVmN3W7H63PJToMk1zS/W4vcY9Pcp5A=; b=qAO2Aws5HlP8grjjKYg1gGzbKYPgOy4PGMJBVnIRbdkC1OArDP2Zj+8Pa4KbCEhQvV z8LigGnCUyF+OB4psBWVApCRfhgkrrR3lGZ6GDtBva27K2LmLGioV6afY7i/qkbX+UpJ 7xG9D/3p27XadwGD0vtvQihKrJZf5UsduqQUgkIiUHi/PHLsLYBOqR2igG83gnWLm2NW 1becCQ3VMIfi188YOg8bXcI3boMPXqYBqtbCrpzLi5GK9IybrdB7Z8cn8rdc71p6J/1h StZeHxvRTyt4CSuuhVz3nb/xz34xvtHoJaylJKgy5MQH+Q5LtDFqkqHzvYSLQmKZUz52 Pyyw==
X-Gm-Message-State: AHYfb5isW7FmcDBiXeZD5LrHM69k9WHx5tHfliCGt4Y5OTnsfaG8lgPv VIuEPZtxmmqDdZyYrLsevwzTDQWw2hJt
X-Received: by with SMTP id g184mr8148113pgc.167.1502297098892; Wed, 09 Aug 2017 09:44:58 -0700 (PDT)
MIME-Version: 1.0
Received: by with HTTP; Wed, 9 Aug 2017 09:44:18 -0700 (PDT)
In-Reply-To: <>
References: <> <> <> <> <> <> <> <> <> <> <>
From: Ted Lemon <>
Date: Wed, 9 Aug 2017 12:44:18 -0400
Message-ID: <>
To: Stuart Cheshire <>
Cc: dnsop <>, Robert Edmonds <>, Richard Barnes <>, Mike West <>, william manning <>, Jacob Hoffman-Andrews <>
Content-Type: multipart/alternative; boundary="94eb2c14088aed4dd8055654cc52"
Archived-At: <>
Subject: Re: [DNSOP] Status of "let localhost be localhost"?
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: IETF DNSOP WG mailing list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Wed, 09 Aug 2017 16:45:02 -0000

On Wed, Aug 9, 2017 at 12:31 PM, Stuart Cheshire <> wrote:

> [*] If you think it’s stupid to suggest a host might not treat “”
> as meaning loopback, why is that any more stupid than suggesting that a
> host might not treat “localhost” as meaning loopback? Both are just as
> arbitrary.

The reason is that we understand the process by which names are resolved,
and we understand the process by which addresses are configured.   You
likely have only one IP stack on your host.   You may have dozens of stub
resolvers.   So the stub resolvers are a target-rich environment for
failure, and they fail unsafe, not safe: by default, they go to the DNS
protocol to resolve names.   If the implementor assumes the DNS will return or ::1, as indeed they tend to do, then they may not think to
read the RFC that says "you need a special case for localhost."

On the other hand, suppose that ::1 doesn't work on your host.   What
happens is that the network transaction fails.   This is a much better
outcome than connecting to an endpoint that is not on the local host,
assuming that it is, and making safety assumptions on the basis that it is.
  Suppose ::1 is configured to connect to an external host.   Well, a ton
of stuff is going to break, and it's going to be really obvious that it's
broken.   You may still experience some negative consequences, but this is
a much more detectable situation, because a lot more things will break.

Of course, the real answer to this is that neither solution is desirable.
I've heard several people here say that if localhost were "fixed" in an
RFC, then the W3C could mark http connections to localhost as secure,
rather than insecure.   This is of course nonsense.   The fact is that you
should always validate the endpoint you are connecting to using some secure
protocol.   With a unix domain socket, you can pass credentials over the
socket.   With a TCP or UDP connection, you can't do that, so you need to
use cryptography.   This is a problem for connections to localhost, of
course, since you can't get a cert for it, but that's probably okay.   A
better test for localhost for W3C is that if the page you are looking at
came from localhost and refers to localhost, *AND* the software that's
making the secure/not judgment is also doing name resolution, and it
implements the RFC we are talking about here, then it can assume that
resources addressed using http://localhost are both secure and
confidential.   Otherwise not (a web page referencing localhost that wasn't
served by localhost should be treated as an attack, for example).