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

Mike West <> Wed, 02 August 2017 13:08 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id AC3F91320A3 for <>; Wed, 2 Aug 2017 06:08:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 O18fHosjIVAp for <>; Wed, 2 Aug 2017 06:08:06 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4003:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id EA5C31320AC for <>; Wed, 2 Aug 2017 06:08:05 -0700 (PDT)
Received: by with SMTP id x3so43732782oia.1 for <>; Wed, 02 Aug 2017 06:08:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vaK1lcxavvRB7URJW/pC12qM8XtaRcBCePEXKmDobCE=; b=NElCoM5j5SlaOed8zZWHxrRpRsoatY6oz1QYZRnniraAHkcKg0uDVSayvcJ08wbLzW EtstoaAdsTbp9i552X+fo8+9UEC73+NCqo7VhvYXCQMMKkhpFhMkaZ04lU105QxT4jgh hCft72cKdm40DGKtzZUUG426odDqYdgqheU7C7XN5ubAap4dh+vlgM0z1k9Y3wi/mx8v j8iGwSmtEHQiqs4gXKvmZtrsg6rbNWQHdfFp9jDBGNW+vPs7joccP+Mf/jz00GVzeW+I 7918PB668kIW0ennwIGSxCs2m3sLAkkLebE0CzTypMrmYVF4kd8DdGVV21a9TKksGp84 Chww==
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=vaK1lcxavvRB7URJW/pC12qM8XtaRcBCePEXKmDobCE=; b=BEX0dUnQpz4AYQ9N2TijlYdHEUl94bPOiCu4ndIYPs4gnf8jlhkeHJva4YM3ZckH+n YJyRARIZvpbE/0+ghVCq1c2qgqkh2lToc8L5jJGZ2m6vz0L6Gaq3+Xe8cFTinyKt6ySH vMx2LjyVmTE3LNGTF2EKWj9Cwcqb1wpZ7JeOGrfMKPef6lvz6WOzqYRp9yUnQIAJSLRz fd6zmkz4DwYkIxmnnH6qDKAj8FxhzTCSwigoDhwcB6eAiMA8zuO3XKsia6effoumjvUg Sds+0w3XUUactqKSsZXBTpemBCS2a7ssaLghuk1JQ/c4UF/TQA/Gw1AwV2BAcbNvRKwM /C2Q==
X-Gm-Message-State: AIVw111NL2AypFSkNmRUiXIP/9DkRd9u/FP+uCvjsIvsv66NAw9Alhlq MOlI3ZFy9exVDZqxXpWsMw17d6JuRLOz
X-Received: by with SMTP id x132mr18264350oif.52.1501679283862; Wed, 02 Aug 2017 06:08:03 -0700 (PDT)
MIME-Version: 1.0
Received: by with HTTP; Wed, 2 Aug 2017 06:07:43 -0700 (PDT)
In-Reply-To: <>
References: <> <> <> <> <> <> <>
From: Mike West <>
Date: Wed, 2 Aug 2017 15:07:43 +0200
Message-ID: <>
To: Richard Barnes <>
Cc: Ted Lemon <>, dnsop <>, Jacob Hoffman-Andrews <>, william manning <>
Content-Type: multipart/alternative; boundary="001a11c180444bb9dc0555c4f4a6"
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, 02 Aug 2017 13:08:08 -0000

On Wed, Aug 2, 2017 at 3:02 PM, Richard Barnes <> wrote:

> On Wed, Aug 2, 2017 at 8:48 AM, Ted Lemon <> wrote:
>> On Aug 2, 2017, at 8:40 AM, Richard Barnes <> wrote:
>> The underlying need here is that application software would like to make
>> use of the fact that it is connecting to "localhost" (vs. other domain
>> names) to make security decisions based on whether traffic is going to
>> leave the host.  So if the network layer remaps localhost to something
>> other than a loopback interface without telling the applications, then
>> you're going to have security problems.
>> The point of this document is to avoid this disconnect by discouraging
>> the sorts of remappings you're talking about.
>> Of course, arguably this is the wrong approach.   Perhaps the right
>> approach is to understand that the security characteristics of "localhost"
>> are not the ones that we want when our goal is to be sure we are connecting
>> to the local host.   Apps don't control the name resolution software that's
>> running on the local host.   If they want to be sure they are connecting
>> locally, perhaps they should be using ::1 instead of localhost as their
>> explicit destination identifier.
> This is indeed what happens today.
> But of course having IP addresses in URLs is both a PITA for developers
> and an anti-pattern more generally.
> If "localhost" were properly defined to be loopback, then applications
> could just hard-wire resolution, and not depend on the good graces of the
> platform resolver.  As, for example, Firefox does with ".onion" today:
> nsDNSService2.cpp#708
> (The "localhost" stuff in that method is unrelated to this discussion BTW;
> it relates to a Firefox-internal mapping of other domains to localhost.)

I was typing basically this when Richard's message came in. So I'll simply
add that Problem 8 in
gapanalysis-09#section-5 suggests that we already know that this kind of
hard-coding will cause issues for future migrations. Just as we'd like to
discourage folks from hard-coding `` to be certain that they're
talking to the loopback interface, it seems reasonable to discourage folks
from hard-coding `::1`.