Re: [TLS] Request for review: Next Protocol Negotiation Extension

Nathaniel W Filardo <nwf@cs.jhu.edu> Thu, 19 August 2010 07:29 UTC

Return-Path: <nwf@cs.jhu.edu>
X-Original-To: tls@core3.amsl.com
Delivered-To: tls@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id D91E43A689F for <tls@core3.amsl.com>; Thu, 19 Aug 2010 00:29:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.299
X-Spam-Level:
X-Spam-Status: No, score=-2.299 tagged_above=-999 required=5 tests=[AWL=-0.300, BAYES_00=-2.599, J_CHICKENPOX_14=0.6]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QmiAG32ef86G for <tls@core3.amsl.com>; Thu, 19 Aug 2010 00:29:48 -0700 (PDT)
Received: from blaze.cs.jhu.edu (blaze.cs.jhu.edu [128.220.13.50]) by core3.amsl.com (Postfix) with ESMTP id BC8C53A6864 for <tls@ietf.org>; Thu, 19 Aug 2010 00:29:47 -0700 (PDT)
Received: from gradx.cs.jhu.edu (gradx.cs.jhu.edu [128.220.13.52]) by blaze.cs.jhu.edu (8.14.3/8.14.3) with ESMTP id o7J7UMVr019928 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <tls@ietf.org>; Thu, 19 Aug 2010 03:30:22 -0400 (EDT)
Received: from gradx.cs.jhu.edu (localhost [127.0.0.1]) by gradx.cs.jhu.edu (8.14.3/8.13.1) with ESMTP id o7J7ULqh020985 for <tls@ietf.org>; Thu, 19 Aug 2010 03:30:21 -0400
Received: (from nwf@localhost) by gradx.cs.jhu.edu (8.14.3/8.13.8/Submit) id o7J7ULpm020984 for tls@ietf.org; Thu, 19 Aug 2010 03:30:21 -0400
Date: Thu, 19 Aug 2010 03:30:21 -0400
From: Nathaniel W Filardo <nwf@cs.jhu.edu>
To: "tls@ietf.org" <tls@ietf.org>
Message-ID: <20100819073021.GV18003@gradx.cs.jhu.edu>
References: <4C6AB936.1070801@extendedsubset.com> <AANLkTimgjqQMdwqL_xZXGSG5hSMLqDtYH62t698e_hx9@mail.gmail.com> <4C6AD7EA.4040307@extendedsubset.com> <000401cb3e4f$456f6d60$d04e4820$@briansmith.org> <4C6B1BAA.5060303@pobox.com> <AANLkTi=QzEmzuhX=rKkTFjVvWxP5r_0zcVHq00L-4JoS@mail.gmail.com> <4C6B8189.5080406@extendedsubset.com> <AANLkTi=9TLG4f5eZ6h6duYKvcVueT53H26WNZpWV6TKS@mail.gmail.com> <F91CB64B-E0F6-42B7-B91B-F9F7464709E1@iki.fi> <AANLkTi=TmbOiLCpiOWyxXSDs-z-V5Bw7w=gLtvoerAvy@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="B2GzrzFQbYDXIsTK"
Content-Disposition: inline
In-Reply-To: <AANLkTi=TmbOiLCpiOWyxXSDs-z-V5Bw7w=gLtvoerAvy@mail.gmail.com>
User-Agent: Mutt/1.5.20 (2009-08-17)
Subject: Re: [TLS] Request for review: Next Protocol Negotiation Extension
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Aug 2010 07:29:49 -0000

On Wed, Aug 18, 2010 at 01:59:42PM -0700, Adam Barth wrote:
> > Further, protocols inside TLS are already implicitly weakly protected if the
> > endpoints require authentication.  There isn't any way that my web browser
> > can carry out an HTTPS cross-protocol attack against an SMTPS server, unless
> > the attacker already knows the appropriate SMTP credentials or I have client
> > certs accepted by the SMTPS server loaded in my browser.  Any attempt the
> > browser makes at authenticating via HTTP mechanisms is going to be ignored
> > by the SMTPS server.  If I require STARTTLS for SMTP, I'm in an even better
> > position than if I were using just SMTPS, as the client cert issue is gone.
> > (Would that the HTTP world actually believed in Upgrade: for starting TLS!)
> 
> That's not an accurate understanding of how cross-protocol attacks
> work.  Whether or not we're inside a TLS tunnel, the issues are the
> same.  One way to understand this is to think about a VPN.  Clearly it
> doesn't matter whether the cross-protocol attacks are taking place
> inside an IPv6 tunnel, does it?

The particular class of attacks you're worried about all involve an agent,
C, making requests to a server S, on behalf of some untrusted third party,
M.  Further, S thinks that it is speaking P and C thinks that it is speaking
Q, with P != Q.  It happens to be that S's interpretation of P is compatible
with C's production of Q.  Is that not an accurate understanding?

For concrete example, in the case of P=SMTP and Q=HTTP, M requests that C
make a POST request to S; S in turn will typically ignore C's HTTP
verb/object/version line and any headers.  Reason being, HTTP verbs and
options (which all involve a : before whitespace) don't overlap with the
SMTP vocabuarly, and so S ignores them as malformed lines.  Note that TLS
NPN does _nothing_ to help here, since TLS is not involved.  _Every_
cross-protocol attack I am aware of is of this class; if you can provide
citations otherwise, I would love to see them.

Now, we can ignore (P,Q) being (SMTP,HTTPS) or (SMTPS,HTTP) since neither
off-diagonal form is going to be able to bring up the TLS session to
everybody's satisfaction.

(P,Q)=(SMTPS,HTTPS) with neither C nor S expecting to see authentication
essentially behaves as (SMTP,HTTP), I agree; TLS NPN helps here.

(P,Q)=(SMTPS,HTTPS) with S expecting C to authenticate will result in a
cross-protocol attack iff either of the following conditions are met:
  1. C has a client certificate which S will accept and S does not expect
     in-band authentication.
  2. M has been able to specifically craft a P-message involving suitable
     credentials for C's use in this transmission.
Neither of these are terribly realisitic (in my mostly speculative opinion).
Note that if S's knobs are set such that P requires a challenge-response
authentication pass, that M will, whp, be unable to successfully take option
2.  TLS NPN doen't hurt here, but there's not a lot of headroom for it to
help -- the connection is likely going to fail anyway.

That was the only claim I was making.

In all, while I have no intrinsic objection to TLS NPN, it seems to me that
the solution should be independent of the cryptographic provisioning layer,
since it demonstrably has nothing to do with said functionality.

--nwf;