Re: [TLS] close_notify and TLS 1.3
Eric Rescorla <ekr@rtfm.com> Sun, 12 November 2017 01:29 UTC
Return-Path: <ekr@rtfm.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6B3C9129415 for <tls@ietfa.amsl.com>; Sat, 11 Nov 2017 17:29:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.com
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 XjZA0u4YKBQI for <tls@ietfa.amsl.com>; Sat, 11 Nov 2017 17:29:45 -0800 (PST)
Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 99DB7128D16 for <tls@ietf.org>; Sat, 11 Nov 2017 17:29:45 -0800 (PST)
Received: by mail-yw0-x22b.google.com with SMTP id x20so3989657ywg.4 for <tls@ietf.org>; Sat, 11 Nov 2017 17:29:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=lrlMVFila4D5jfHPv+W7dKtLw2Uzo6N6EuNTQvFu2YY=; b=ZH/AKIp6ahaGt2Dekh2RXkW3TKH88eMSE+GKyFPk+pBclKlH7gsZh/E5K9igbl/EI9 Qj74UGxdw2ttyEk/ChVP/o7Hy0rALan8g92AAatnpE46kuS09ocOUdYM1kk5rhHnxCi9 hilf5KC7CBdGUUP69BASyvFtqslmbgXYYY3vF+OUwrwlaN+JP0kQGdSpV71O7qKeIgxk 7jR224Mpq8i6nEl0oTCU17DUmjP827QOe7XGBQuclgTL32VBl0Ww/Doc+Pk3MCLCZaTv TLhAc252LjxVOAt/TasUh5FADP0Lh0c0f6+DbupdRpaVQ9TA9CSXPGH1aTI95y7Fu/LW 01yA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=lrlMVFila4D5jfHPv+W7dKtLw2Uzo6N6EuNTQvFu2YY=; b=Vz93/Qab1WDVvY3/WQYh5rx0Vu1OzxQ0H5V9xoc6fLBK6u3UchU8iVt/Pp3aGYf07Z bbxprVk/ZoEnBLFxfXfYWiOG4/5fTN3IqZfItlHFBcD8Qnz+XGUENfnFBcOii7e4bOKz 7ubSv08i3p+/FKLZhwQw9KdPsdBdqBMZ2IKemQrnyUCm4LYVds8hssmIVR+C/QExUkXJ qkkrYqXCxZz3UG0OOZE8TO/76iZvJdxZZVt8boiZLpwlAEqS+RGYz+YhaM20alRu4BZX UjqAW4v0aJRCVolIDe6gbeSDvZUZWVMzQ+jHkVj+OsTUMvhpsejIiqX9zmrUOUBMIRk+ 7mBw==
X-Gm-Message-State: AJaThX6QzsEaHb8EfpQsNAD9FauvILQqtbFnBNPAfSrLLy14ZTB2GECH gqyfltv7xT1cLWVo+XDBiljv+ewcUHYsmkTeyGjC9Q==
X-Google-Smtp-Source: AGs4zMb4snaK+wjoMqPcW/PzRTwu/yiLIC6FWuz9MPuromVH/fyr4DfgAtay6BxbYvy881tFbkXgs4rKVILYOBqtENQ=
X-Received: by 10.129.172.25 with SMTP id k25mr1830486ywh.155.1510450184871; Sat, 11 Nov 2017 17:29:44 -0800 (PST)
MIME-Version: 1.0
Received: by 10.129.61.12 with HTTP; Sat, 11 Nov 2017 17:29:04 -0800 (PST)
In-Reply-To: <EA54B9E6-A6A2-447D-B7CF-ADF5F9D07966@apple.com>
References: <A6C599ED-3F3D-462F-9B39-1FEF6A0B549B@apple.com> <CABkgnnU3OuzEm2gF6BYif4c0evAfzUYH-PpxoERD9xFEosQ_oQ@mail.gmail.com> <CAF8qwaB2fXoiy8RLdg9Kc+5xAoCgU2JkoHXw8H-xSsEXMWWgXg@mail.gmail.com> <CABcZeBPHGNHBtx4c3=jPS8-PJDHF3E608KoDswJucbaiFFkYwg@mail.gmail.com> <EA54B9E6-A6A2-447D-B7CF-ADF5F9D07966@apple.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Sat, 11 Nov 2017 17:29:04 -0800
Message-ID: <CABcZeBNNXowHG9a-WAEZ3Nm7KyD1OL1fk7-Gj2SPrQdU+KS-Ow@mail.gmail.com>
To: David Schinazi <dschinazi@apple.com>
Cc: David Benjamin <davidben@chromium.org>, "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="94eb2c1badfcb87852055dbf166c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/O-qXQTpcZe42ncRLtoyM4Yrgf4U>
Subject: Re: [TLS] close_notify and TLS 1.3
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
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: Sun, 12 Nov 2017 01:29:50 -0000
Please. -Ekr On Sat, Nov 11, 2017 at 5:24 PM, David Schinazi <dschinazi@apple.com> wrote: > Thanks for checking gents! > > Would you like me to send a PR? > > David > > > On Nov 12, 2017, at 09:13, Eric Rescorla <ekr@rtfm.com> wrote: > > Initial inspection suggests that NSS behaves the same way, so I would be > fine with this change. > > -Ekr > > > On Sat, Nov 11, 2017 at 3:46 PM, David Benjamin <davidben@chromium.org> > wrote: > >> I think this change is a good idea. >> >> Our implementation actually does this already anyway. We are happy to >> continue servicing writes even when the read half has consumed a >> close_notify. I believe we inherited this behavior from OpenSSL, so it >> should be there too. Go's crypto/tls implementation appears to also already >> do this. >> >> We don't have a particular need for the half-close semantics that I know >> of, but I don't care for the current spec text (it requires yet another >> undesirable read/write sync point). Aligning with TCP's semantics is also >> generally a good default. >> >> On Sat, Nov 11, 2017 at 11:18 PM Martin Thomson <martin.thomson@gmail.com> >> wrote: >> >>> This seems like it might be worth looking at. This seems to be >>> something that harks back to SSL3 or even earlier. We aren't going to >>> make it so that you can rely on this behaviour, but we might be able >>> to make it possible to half-close, which for new protocols using TLS >>> could be hugely useful. >>> >>> On Sat, Nov 11, 2017 at 5:21 PM, David Schinazi <dschinazi@apple.com> >>> wrote: >>> > Hello all, >>> > >>> > Currently TLS 1.3 specifies close_notify in the same way that TLS 1.2 >>> did. >>> > I believe that has issues and this might be the right time to fix them. >>> > The purpose of close_notify is to protect against data truncation >>> attacks, >>> > each side is required to send close_notify before closing the write >>> side of >>> > the transport connection so the other side knows that the data was not >>> > truncated. >>> > As such, close_notify only needs half-close semantics to prevent >>> truncation. >>> > >>> > However, the specification contains the following text: >>> > << Each party MUST send a “close_notify” alert before closing the >>> write side >>> > of the connection, unless some other fatal alert has been >>> transmitted. >>> > The other party MUST respond with a “close_notify” alert of its >>> own and >>> > close >>> > down the connection immediately, discarding any pending writes. >> >>> > >>> > This means that an application-layer client can't send a query then >>> close >>> > their >>> > write transport when they know that they're done, because the server >>> would >>> > terminate the TLS session before sending the reply. On top of this, >>> when >>> > the server receives the close_notify, it may have already sent part of >>> the >>> > reply >>> > (or wrote it to the socket send buffer) so the responding close_notify >>> would >>> > in effect be inflicting a truncation attack on the client. >>> > >>> > This doesn't make much difference for HTTP because clients already >>> > don't close their write transport after sending a reply, however >>> having the >>> > option do do this could allow innovation in new protocols that can >>> define >>> > the semantics of when they use close_notify. An example is DNS PUSH: >>> > https://tools.ietf.org/html/draft-ietf-dnssd-push >>> > >>> > A proposal to solve this problem would be to give close_notify >>> half-close >>> > semantics: we keep the requirements that a close_notify be sent before >>> > closing the transport, and that any data received after a close_notify >>> is >>> > ignored, but we simply remove the requirement to immediately reply >>> > with a close_notify. This has the advantage that current >>> implementations >>> > are already compliant but future ones can leverage this improvement. >>> > >>> > What do you think? Is this worth discussing on Thursday? >>> > >>> > Thanks, >>> > David Schinazi >>> > >>> > _______________________________________________ >>> > TLS mailing list >>> > TLS@ietf.org >>> > https://www.ietf.org/mailman/listinfo/tls >>> > >>> >>> _______________________________________________ >>> TLS mailing list >>> TLS@ietf.org >>> https://www.ietf.org/mailman/listinfo/tls >>> >> >> _______________________________________________ >> TLS mailing list >> TLS@ietf.org >> https://www.ietf.org/mailman/listinfo/tls >> >> > _______________________________________________ > TLS mailing list > TLS@ietf.org > https://www.ietf.org/mailman/listinfo/tls > > >
- [TLS] close_notify and TLS 1.3 David Schinazi
- Re: [TLS] close_notify and TLS 1.3 Martin Thomson
- Re: [TLS] close_notify and TLS 1.3 David Benjamin
- Re: [TLS] close_notify and TLS 1.3 Eric Rescorla
- Re: [TLS] close_notify and TLS 1.3 David Schinazi
- Re: [TLS] close_notify and TLS 1.3 Eric Rescorla
- Re: [TLS] close_notify and TLS 1.3 Martin Thomson
- Re: [TLS] close_notify and TLS 1.3 David Schinazi
- Re: [TLS] close_notify and TLS 1.3 Ilari Liusvaara
- Re: [TLS] close_notify and TLS 1.3 Hubert Kario
- Re: [TLS] close_notify and TLS 1.3 Eric Rescorla
- Re: [TLS] close_notify and TLS 1.3 David Benjamin
- Re: [TLS] close_notify and TLS 1.3 Hubert Kario
- Re: [TLS] close_notify and TLS 1.3 Eric Rescorla