Re: [TLS] TLS or HTTP issue?

Bruno Harbulot <> Fri, 06 November 2009 15:47 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 357253A6852 for <>; Fri, 6 Nov 2009 07:47:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id jRjlG0O+TOUz for <>; Fri, 6 Nov 2009 07:47:00 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id D4C523A6991 for <>; Fri, 6 Nov 2009 07:46:59 -0800 (PST)
Received: from list by with local (Exim 4.50) id 1N6R1w-0004iI-9Q for; Fri, 06 Nov 2009 16:47:16 +0100
Received: from ([]) by with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <>; Fri, 06 Nov 2009 16:47:16 +0100
Received: from Bruno.Harbulot by with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <>; Fri, 06 Nov 2009 16:47:16 +0100
From: Bruno Harbulot <>
Date: Fri, 06 Nov 2009 15:46:54 +0000
Lines: 74
Message-ID: <>
References: <> <>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Thunderbird (X11/20090817)
In-Reply-To: <>
Sender: news <>
Cc: Eric Rescorla <>
Subject: Re: [TLS] TLS or HTTP issue?
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." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 06 Nov 2009 15:47:01 -0000


Nikos Mavrogiannopoulos wrote:
> Eric Rescorla wrote:
>> TLS WG members will want to check out this announcement of a
>> new attack on the TLS renegotiation logic. See here:
>> The high-level summary is that the attacker negotiates TLS with the
>> server and then subsequently proxies the client's negotiation *over*
>> that channel. This allows the attacker to inject arbitrary content of
>> their choice in front of data sent from the TLS client to the TLS
>> server. This data will be treated by the server as if it came from the
>> client. Once the new handshake has finished, the attacker can't
>> do anything else useful.
>  I'll become a bit pedantic and note here that this isn't really a TLS
> issue. We have an initial server-authenticated only session and some
> renegotiation of parameters over it to authenticate the client. However
> TLS doesn't guarantee[0] that if the renegotiation is successful
> authenticating the client, then the data from the initial session were
> also by the same authenticated client.
>  Think for example a session that it is anonymous (DH). Why one should
> assume that commands over the anonymous connection are to be trusted if
> a successful renegotiation follows?
> So for me the issue is on HTTP's usage of the TLS protocol
> renegotiation. After a TLS renegotiation for authentication the previous
> command cache should have been cleared and reissued after negotiation.

I think you have a point, I'm not sure if it's HTTP as such that is to 
blame, rather the assumptions made by the frameworks implementing it.

Authentication via client-certificate in HTTPS has always been a bit at 
odds with the rest of the HTTP authentications schemes. HTTP has status 
codes for requiring authentication (401), but client-cert authentication 
doesn't fit well into this model. The need vs. want client-cert feature 
itself isn't handled particularly well by browsers. Requiring a 
client-cert (and closing the connection if one isn't presented) can be 
confusing to the user.

I think the problem comes from the fact that SSL/TLS is intended to 
behave transparently, like normal sockets, for the application using it, 
whereas this issue is clearly not the case when re-negotiation happens. 
Perhaps this should just be another special case handled by the 
application layer (the other special case I have in mind is the way 
closing the socket behaves slightly differently to normal sockets).

This attack could be prevented if the HTTP framework was notified when a 
renegotiation had happened and thus made aware that the command it just 
got may not have been made with the same credentials.
For example, this wouldn't be an issue if:
- the HTTP method sent just before the renegotiation was a safe method 
- the HTTP application was using safe methods correctly (no GET 
/page?action=delete for example)
- if the HTTP method isn't safe (POST, PUT, ...), then send a 401 status 
response. The problem here is that a 401 response status requires a 
challenge header according to the HTTP spec and there isn't one to 
require a client certificate; this being said, it should be possible to 
extend HTTP and have 'WWW-Authenticate: Transport' (or something 
similar) meaning that it's up to TLS to provide the required 
authentication information.

As you said, I also think handling this problem at the TLS level is 
cleaner since the assumption that TLS sockets behave transparently like 
normal sockets should still be valid in this case.

Best wishes,