Re: [TLS] Should we require implementations to send alerts?

Florian Weimer <fweimer@redhat.com> Wed, 16 September 2015 11:54 UTC

Return-Path: <fweimer@redhat.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C878D1A1BC2 for <tls@ietfa.amsl.com>; Wed, 16 Sep 2015 04:54:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.611
X-Spam-Level:
X-Spam-Status: No, score=-6.611 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2Ii_TonVvKyX for <tls@ietfa.amsl.com>; Wed, 16 Sep 2015 04:54:50 -0700 (PDT)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id ECC601A0393 for <tls@ietf.org>; Wed, 16 Sep 2015 04:54:22 -0700 (PDT)
Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id B1A392F90D0; Wed, 16 Sep 2015 11:54:22 +0000 (UTC)
Received: from oldenburg.str.redhat.com (oldenburg.str.redhat.com [10.33.200.60]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8GBsKgk007743 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Sep 2015 07:54:21 -0400
To: Henrik Grubbström <grubba@gmail.com>
References: <CABcZeBPnO4zn_HkvwLpLC+EVYN8EKOBEsR80oRt3HZgsiNGDoQ@mail.gmail.com> <55F81AA6.2040107@redhat.com> <20150915162921.GG13294@localhost> <55F93E51.50001@redhat.com> <CALuAYvaTVtPf=XXC8xhFA4AEgZ=qYHH8mBSMkoWKQb+bOgniNw@mail.gmail.com>
From: Florian Weimer <fweimer@redhat.com>
Message-ID: <55F9586C.6000104@redhat.com>
Date: Wed, 16 Sep 2015 13:54:20 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <CALuAYvaTVtPf=XXC8xhFA4AEgZ=qYHH8mBSMkoWKQb+bOgniNw@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/CdLfk0AWNs8fRzXoGF4J_aP8QHM>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Should we require implementations to send alerts?
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
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/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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: Wed, 16 Sep 2015 11:54:52 -0000

On 09/16/2015 01:51 PM, Henrik Grubbström wrote:
> On Wed, Sep 16, 2015 at 12:02 PM, Florian Weimer <fweimer@redhat.com> wrote:
>> On 09/15/2015 06:29 PM, Nico Williams wrote:
> [...]
>>>
>>> But if you have a fatal error you'll be closing immediately anyways.
>>> Does sending the fatal alert cause a problem other than increase the
>>> likelihood of RSTs?  What is the alternative considering that the next
>>> step is to close the connection anyways?
>>
>> I'm trying to explain that any requirement to send fatal alerts will be
>> difficult to implement.  With the BSD sockets API, the only way to do
>> that reliable is *not* to close the socket immediately, which is
>> apparently not what you (or existing APIs) expect, and which is where
>> the difficulty lies.
> 
> What about SO_LINGER?

With full-duplex connections, it does not make a difference.  TCP will
still detect a data loss event, send the RST segment, and discard the
queued fatal alert.

-- 
Florian Weimer / Red Hat Product Security