Re: [TLS] draft-rescorla-tls-renegotiate and MITM resistance

Michael D'Errico <mike-list@pobox.com> Tue, 10 November 2009 23:57 UTC

Return-Path: <mike-list@pobox.com>
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 C06AB3A6A2B for <tls@core3.amsl.com>; Tue, 10 Nov 2009 15:57:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.29
X-Spam-Level:
X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 tests=[AWL=-0.291, BAYES_00=-2.599, J_CHICKENPOX_33=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 Cs7zsj1vq0YA for <tls@core3.amsl.com>; Tue, 10 Nov 2009 15:57:30 -0800 (PST)
Received: from sasl.smtp.pobox.com (a-pb-sasl-quonix.pobox.com [208.72.237.25]) by core3.amsl.com (Postfix) with ESMTP id C6B353A69CA for <tls@ietf.org>; Tue, 10 Nov 2009 15:57:30 -0800 (PST)
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id C6EF57B81B for <tls@ietf.org>; Tue, 10 Nov 2009 18:57:57 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=GPP5xcV34Rek 14RcBBv4Fv9vjKc=; b=kvCNfds5BVaKk2gpe/AvpeIXbm/DB/Es/dvlLviuBpeQ FB5ejfhcEICivggzLjH/Ehh3nYaJNZqn34ydnSbA/r+f5pmEk6Rt+9Vh+MX2I82c x81hqtjOZyoXu/5KcYAgU3ej5G/gOT+Y1vpbnZN/5+xUL+EPulIJgqk3b7hRcsc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=message-id:date :from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sasl; b=UPblOV gg2Vh6jz8cFqLTKg2weJZmwb8kyfZJTWm3IIe7qjdnFmKXZZR1MP5LntajAzTFbd wi2HCHXQ33+zyYwZHkq2Jd93DZuYfebWnWAKGcIGxRdYeZjnbCf0I/1vUjoyYdyZ AflElIMgMs3LMggj/YtwCt5jgYyYVvAmb4ANM=
Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id C313D7B819 for <tls@ietf.org>; Tue, 10 Nov 2009 18:57:57 -0500 (EST)
Received: from administrators-macbook-pro.local (unknown [24.234.114.35]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 4A5F47B818 for <tls@ietf.org>; Tue, 10 Nov 2009 18:57:57 -0500 (EST)
Message-ID: <4AF9FE4E.5050001@pobox.com>
Date: Tue, 10 Nov 2009 15:59:10 -0800
From: Michael D'Errico <mike-list@pobox.com>
User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812)
MIME-Version: 1.0
To: tls@ietf.org
References: <200911102101.nAAL1Ai9025439@fs4113.wdf.sap.corp>
In-Reply-To: <200911102101.nAAL1Ai9025439@fs4113.wdf.sap.corp>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Pobox-Relay-ID: DEC3E7AE-CE54-11DE-8EB4-7B3EEE7EF46B-38729857!a-pb-sasl-quonix.pobox.com
Subject: Re: [TLS] draft-rescorla-tls-renegotiate and MITM resistance
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: Tue, 10 Nov 2009 23:57:31 -0000

> What about the application data sent between the ChangeCipherSpec
> and the Finished messages?

I don't think application data should be (allowed to be) sent between
ChangeCipherSpec and Finished.  Should it be required for a fatal alert
to be sent if such data is received?  That would make sense.

> Since the current SSL&TLS specs are completely ambiguous, you can
> not claim "if your TLS API was able to tell you exactly where in
> the application data stream", because currently no such semantics
> exist!  Two independent implementations of TLS that claim to
> tell you exactly where the position is may identify entirely
> different positions -- and with the current spec, it is impossible
> to decide where the position should be.

I disagree.  When you receive the ChangeCipherSpec, the new parameters
take effect; the Finished message has to immediately follow to verify
the handshake succeeded.  Verification of the Finished message signals
the end of the old session and the beginning of the new.

This would require no application data be sent between CCS and Finished,
but that should be a requirement anyway.  And it would be surprising
to learn about an implementation that doesn't generate Finished
immediately after generating the CCS.

>> That would catch the MITM attack being discussed now.
> 
> We're going to plug that MITM attack with secure renegotiation.

Sure, but my point was that if these semantics had existed, this MITM
attack might not have been possible.  Or rather, it would have been
easier to see the problem of applying the new credentials to the old
request retroactively.  I think it would be valuable for an API to add
these semantics even with the addition of secure renegotiation.

> But that will not affect the miserable ambiguity for where the
> original session ends and the new session starts if we do allow
> established identities to change during renegotiation.

The CCS/Finished tells you where to draw the line.

> To fix that, we will have to spell out the precise semantics
> in a specification.  IMHO, the cleanest would be to disallow
> application data transfer during a renegotiation handshake.

This should be up to the particular application.  If rekeying is the
reason for the renegotiation, you want to keep data flowing as much
as possible.  For changing identities, an application might forbid
data flow, or it may not.

>> Also silently dropping data never seems like the right thing to do IMHO.
> 
> _I_ did not write _silent_ dropping.  Dropping and aborting is fine.
> Dropping in the sense of "MUST NOT make it available to the application".

OK, but I would advocate MUST make available to the application and
provide an indication of where the renegotiation finished.

The problem with HTTPS is that the request line is sent before the
handshake even starts, and then once completed, that request line is
reused under the new credentials.  HTTP(S) needs a way to ask the
client to resend its entire request.

Mike