Re: [TLS] Zero length fragments and fragmented Alert messages

Eric Rescorla <ekr@rtfm.com> Tue, 18 October 2016 10:56 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 B747612998D for <tls@ietfa.amsl.com>; Tue, 18 Oct 2016 03:56:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 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_NONE=-0.0001] 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 DlR4Cd-J0kku for <tls@ietfa.amsl.com>; Tue, 18 Oct 2016 03:56:42 -0700 (PDT)
Received: from mail-yb0-x22b.google.com (mail-yb0-x22b.google.com [IPv6:2607:f8b0:4002:c09::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 265FF129426 for <tls@ietf.org>; Tue, 18 Oct 2016 03:56:42 -0700 (PDT)
Received: by mail-yb0-x22b.google.com with SMTP id 184so75345034yby.2 for <tls@ietf.org>; Tue, 18 Oct 2016 03:56:42 -0700 (PDT)
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=x85XxCLUnK7miUxI1QvkJ3JLx6HCnIEMiGDA3lklaUA=; b=DI+RD4rnCXCvNuyOj5cGT8aFBr9/9tLETdQ3IYXKMLeF9tiRDcnjGcl1VrIIcn1AS4 tZ6Ju7Wj9jXEcwSkYX9gYN/ZAZzEK1w4uvnbMCKhsFqOFM3PD51xsnCuikamg98c0ffh VXJMgXyL+x0+22mRVdxfNM+XtjFq8jhzliouyf4t3VNV4c6vhuzhh15aSU7j7y1WROxT casCQJC8D5KpFFAP6ZQUJKoQQMFGTisIp/lUJSCo2Z/yrNPzz9yq6jVbqwwTUwyN8/1c +sxeRnXwanjdqpBo5ljrSI3+5ZfX1PB2pohBpTSKqHud1u7w6S7r9Nc9LBeA7Z41Lz9n fZeA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=x85XxCLUnK7miUxI1QvkJ3JLx6HCnIEMiGDA3lklaUA=; b=QKoh0HfsJiiEpZoQBciofyQKAQpvx33CR6vZQkjTd6qmYbFCx0VI+vAvXOBh9nwPid /s2uaepBOeltwdsjxuWaO9BXt0gi/71ks+tzYk8WlFuxepruA2WeFEceN2UFJLCarDeB fcq3MsOHSiTASHmWsmHMGO5uXoehJN6y0Q/vf+mUS/eYOueoItVdZq6Py0o+IJX3IxFM J1ZqUqkP44ksrexKCp63UdFrqtY29uINlwVoYP9e6frHg8IyO5lU9BcaMzzbcUeDHimy ClVcZQRoVKQHNc0whqvRJoepn+8DraWjqHG2FVoC6b0Lz1tkTHzgJcybbj0h3f1aTV6A g5Cg==
X-Gm-Message-State: AA6/9Rn51/NMrss59VaaIJR72ZBXomulKhKzS5BiwCYImfDFMeFI4mLaamQiJ/B5KySS/5fo3WVt89OW0XY6qQ==
X-Received: by 10.37.171.234 with SMTP id v97mr2132829ybi.161.1476788201383; Tue, 18 Oct 2016 03:56:41 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.75.212 with HTTP; Tue, 18 Oct 2016 03:56:01 -0700 (PDT)
In-Reply-To: <2491854.n0oRtYzp7Y@pintsize.usersys.redhat.com>
References: <2491854.n0oRtYzp7Y@pintsize.usersys.redhat.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Tue, 18 Oct 2016 06:56:01 -0400
Message-ID: <CABcZeBOWX0a_UZyoWvhDPyb9SBPX9z_FED5mzkpA5WyY+909+A@mail.gmail.com>
To: Hubert Kario <hkario@redhat.com>
Content-Type: multipart/alternative; boundary="94eb2c0ce1f8271abd053f218c3b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/jJYYP8Hztbj2AFC-3BcjAuwBO3I>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Zero length fragments and fragmented Alert messages
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.17
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: Tue, 18 Oct 2016 10:56:43 -0000

"   decode_error  A message could not be decoded because some field was
      out of the specified range or the length of the message was
      incorrect. "

I suppose you could argue that:

"  This alert is used for errors where the message does
      not conform to the formal protocol syntax.  "

Rules that out, but I think I'm willing to stretch it here.

-Ekr


On Tue, Oct 18, 2016 at 6:28 AM, Hubert Kario <hkario@redhat.com> wrote:

> Current draft states:
>
>   Alert messages ({{alert-protocol}}) MUST NOT be fragmented across
> records.
>
> and
>
>   Implementations MUST NOT send zero-length fragments of Handshake or
>   Alert types, even if those fragments contain padding.
>
> But I don't see what is the expected behaviour of the side receiving such
> malformed messages.
>
> Especially the fragmented alerts are unique in that any other message type
> can
> be fragmented, so no rules define how to handle incorrectly fragmented
> messages. Or at least I don't see them.
> --
> Regards,
> Hubert Kario
> Senior Quality Engineer, QE BaseOS Security team
> Web: www.cz.redhat.com
> Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno, Czech Republic
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>
>