Re: [TLS] [Technical Errata Reported] RFC8446 (7620)

Eric Rescorla <ekr@rtfm.com> Mon, 28 August 2023 12:43 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 598FEC1519BC for <tls@ietfa.amsl.com>; Mon, 28 Aug 2023 05:43:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.904
X-Spam-Level:
X-Spam-Status: No, score=-6.904 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_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20221208.gappssmtp.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E6MkpHdDUZhE for <tls@ietfa.amsl.com>; Mon, 28 Aug 2023 05:43:38 -0700 (PDT)
Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9379EC1519BA for <tls@ietf.org>; Mon, 28 Aug 2023 05:43:38 -0700 (PDT)
Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-58d9ba95c78so37203167b3.1 for <tls@ietf.org>; Mon, 28 Aug 2023 05:43:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20221208.gappssmtp.com; s=20221208; t=1693226618; x=1693831418; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RLqCAU8QIFF+fbzMYZMfhVnyi5NvXmUvB+HR7aoT230=; b=CadSxDlGk4Z0IOW2f66NVZ8s31wrT7v52rPWuAV18u39eAKBqNtq5Xnus/ZAAs8+f6 LEiITB2wHa+K5F1wK9nhWcNR/qiB8IgapJ5wcJ1mVRvHYqxBOUxFp0USMmLT3993+MKZ MjueydkxF2Fme/teOOjPnRO4nhvdtmOAYWP/79DMbwWHkOrEbXRRX9N3ypu+HFblVfOM fv4CSqNGL1/oRXS33BTCLOMrWCqCPs2RxmfvENI0yC5HFE7jKno3SIbuhP3dN2RjWl/7 NgqCwZUmzfXmB6TeQHWu23xtHe0znjkW145ylZAmpWyci0sZZ+9KJYa/LbQHYZoQQYAs Wcmw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693226618; x=1693831418; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RLqCAU8QIFF+fbzMYZMfhVnyi5NvXmUvB+HR7aoT230=; b=H4yoEw1Oeyh7QORKmu4w7FprMv63lCzYc7EwvN8Dqp/tiCGNT4jc9Dn4hAauOUbiGU 8F7n6akd1yq7EhYs94Pev3DMBsCWQMwTN6FGE+MYdm2xUM6jZTcls00Z7tK8J+9mnOko o360MnkZ3zyv2b0SrF9P6ADlFjCa9JeCX8diqjBFj6gDPxODC0ASwmgGapgAODNY+4gs V1c+yrgsb+isnhPjmYCTJL5UECjygEgLqcBAHS9hAIEwKifEKkolmPIQO+HXG8BRIKIz 8L8TbKAlsx+WefYbpjbn0648xVrL2nPU16WcNn0+QsNCQf7eJv20g3p03KBoC0rVsk99 3d2g==
X-Gm-Message-State: AOJu0YwzH2CYa+s+SQJZpnPD2C0p1OKWHrAYUOqV35t85fMhySGyELZ1 oWRpBLQkX5TTc8PDmhu086CcA7rlOEcdKasJ/HGecw==
X-Google-Smtp-Source: AGHT+IG/ezuMUAMFgiYYnpqYd0WJOvTD7QRKxpW96g1YxfR5ta6F5VPj+kpwrgohHfv14ooC7EMBCO8DD6kuCTXO5Aw=
X-Received: by 2002:a81:8782:0:b0:589:a9fc:ffcd with SMTP id x124-20020a818782000000b00589a9fcffcdmr26055002ywf.20.1693226617670; Mon, 28 Aug 2023 05:43:37 -0700 (PDT)
MIME-Version: 1.0
References: <20230828110218.37E627FDEA@rfcpa.amsl.com>
In-Reply-To: <20230828110218.37E627FDEA@rfcpa.amsl.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 28 Aug 2023 05:43:01 -0700
Message-ID: <CABcZeBPHevj+4oYOyrbZC1FPmEtq961h8zThgAR07Bw8GRyC0g@mail.gmail.com>
To: RFC Errata System <rfc-editor@rfc-editor.org>
Cc: rdd@cert.org, paul.wouters@aiven.io, caw@heapingbits.net, joe@salowey.net, sean+ietf@sn3rd.com, research@bensmyth.com, tls@ietf.org
Content-Type: multipart/alternative; boundary="000000000000122dcd0603fb0bee"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/05hUGQmafOjZmfDjmTDc5qaKY18>
Subject: Re: [TLS] [Technical Errata Reported] RFC8446 (7620)
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.39
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: Mon, 28 Aug 2023 12:43:42 -0000

Hi Ben,

Before addressing the text, let's make sure we are on the same page about
the situation.

As you probably know, there are quite a few situations in which endpoints
close the connection before
receiving a close_notify, for instance, when they receive an end of data
message in the application
protocol or when they time out. The former case is generally safe, the
latter is not, but extremely
common, in fact perhaps the dominant case. Do we agree on that?

-Ekr


On Mon, Aug 28, 2023 at 4:02 AM RFC Errata System <rfc-editor@rfc-editor.org>
wrote:

> The following errata report has been submitted for RFC8446,
> "The Transport Layer Security (TLS) Protocol Version 1.3".
>
> --------------------------------------
> You may review the report below and at:
> https://www.rfc-editor.org/errata/eid7620
>
> --------------------------------------
> Type: Technical
> Reported by: Ben Smyth <research@bensmyth.com>
>
> Section: 6.1
>
> Original Text
> -------------
> Each party MUST send a "close_notify" alert before closing its write
> side of the connection, unless it has already sent some error alert.
> This does not have any effect on its read side of the connection.
> Note that this is a change from versions of TLS prior to TLS 1.3 in
> which implementations were required to react to a "close_notify" by
> discarding pending writes and sending an immediate "close_notify"
> alert of their own.  That previous requirement could cause truncation
> in the read side.  Both parties need not wait to receive a
> "close_notify" alert before closing their read side of the
> connection, though doing so would introduce the possibility of
> truncation.
>
> Corrected Text
> --------------
> Each party MUST send a "close_notify" alert before closing its write
> side of the connection, unless it has already sent some error alert.
> This SHOULD NOT have any effect on the read side of the sender's
> connection;
> parties SHOULD receive a "close_notify" alert before closing the read side
> of their connection.
> Note that this is a change from versions of TLS prior to TLS 1.3 in
> which receivers were required to react to a "close_notify" by
> discarding pending writes and sending an immediate "close_notify"
> alert of their own.  That previous requirement could cause truncation
> in the read side.  Both parties need not wait to receive a
> "close_notify" alert before closing their read side of the
> connection, though doing so would introduce the possibility of
> truncation.
>
> Notes
> -----
> As-is there's a specification-level vulnerability: Specification-compliant
> implementations may be vulnerable to truncation attacks.
>
> I suggest using SHOULD NOT & SHOULD for better signposting and to avoid
> specification-level vulnerability.
>
> I also suggest minor tweaks for readability.
>
> Instructions:
> -------------
> This erratum is currently posted as "Reported". If necessary, please
> use "Reply All" to discuss whether it should be verified or
> rejected. When a decision is reached, the verifying party
> can log in to change the status and edit the report, if necessary.
>
> --------------------------------------
> RFC8446 (draft-ietf-tls-tls13-28)
> --------------------------------------
> Title               : The Transport Layer Security (TLS) Protocol Version
> 1.3
> Publication Date    : August 2018
> Author(s)           : E. Rescorla
> Category            : PROPOSED STANDARD
> Source              : Transport Layer Security
> Area                : Security
> Stream              : IETF
> Verifying Party     : IESG
>