Re: [usefor] Issue with ABNF grammar in RFC 5536

Michael Bäuerle <michael.baeuerle@stz-e.de> Thu, 13 July 2017 16:55 UTC

Return-Path: <michael.baeuerle@stz-e.de>
X-Original-To: usefor@ietfa.amsl.com
Delivered-To: usefor@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 86694128B8F for <usefor@ietfa.amsl.com>; Thu, 13 Jul 2017 09:55:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 aQ7WSszFhIjo for <usefor@ietfa.amsl.com>; Thu, 13 Jul 2017 09:55:04 -0700 (PDT)
Received: from hardbaer.com (mail.hardbaer.com [91.250.101.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C4E151270A3 for <usefor@ietf.org>; Thu, 13 Jul 2017 09:55:03 -0700 (PDT)
X-No-Relay: not in my network
X-No-Relay: not in my network
X-No-Relay: not in my network
Received: from WStation4 (business-092-079-177-146.static.arcor-ip.net [92.79.177.146]) by hardbaer.com (Postfix) with ESMTPSA id 59D5C28002A; Thu, 13 Jul 2017 18:55:01 +0200 (CEST)
Date: Thu, 13 Jul 2017 18:54:49 +0200
From: Michael Bäuerle <michael.baeuerle@stz-e.de>
To: Julien ÉLIE <julien@trigofacile.com>
Cc: usefor@ietf.org, pkyzivat@alum.mit.edu
Message-ID: <20170713185449.09e33b08@WStation4>
In-Reply-To: <69036829-918f-2b31-7145-45b8629ef341@trigofacile.com>
References: <15001f4b-477e-1900-6d3b-d0635b9dad94@trigofacile.com> <20170707185914.06cfa0ac@WStation4> <69036829-918f-2b31-7145-45b8629ef341@trigofacile.com>
Organization: STZ Elektronik
User-Agent: Claws-Mail/3.13.1
MIME-Version: 1.0
Content-Type: multipart/signed; micalg="pgp-sha512"; boundary="Sig_/qv9Y7DmWkJjkZyP1fqY.1H="; protocol="application/pgp-signature"
Archived-At: <https://mailarchive.ietf.org/arch/msg/usefor/1EtU5BLtxWDU0dRz2I9cWMvjBO0>
Subject: Re: [usefor] Issue with ABNF grammar in RFC 5536
X-BeenThere: usefor@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Ongoing discussion of usefor issues." <usefor.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/usefor>, <mailto:usefor-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/usefor/>
List-Post: <mailto:usefor@ietf.org>
List-Help: <mailto:usefor-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/usefor>, <mailto:usefor-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Jul 2017 16:55:06 -0000

Julien ÉLIE wrote:
> Michael Bäuerle wrote:
> > Julien ÉLIE wrote:
> > > 
> > > Paul Kyzivat noticed in the IETF Gen-ART mailing-list
> > >     https://www.ietf.org/mail-archive/web/gen-art/current/msg14921.html
> > > that there is an issue in the ABNF of RFC 5536 (USEFOR).
> > >
> > >      The following news header fields extend those defined in Section 3.6
> > >      of [RFC5322]:
> > >
> > >        fields        =/ *( approved /
> > >                            archive /
> > >                            control /
> > >                            distribution /
> > >                            expires /
> > >                            followup-to /
> > >                            injection-date /
> > >                            injection-info /
> > >                            lines /
> > >                            newsgroups /
> > >                            organization /
> > >                            path /
> > >                            summary /
> > >                            supersedes /
> > >                            user-agent /
> > >                            xref )
> > >
> > > to:
> > >
> > >      The following news header fields are defined by this document:
> > >
> > >        news-fields    =    approved /
> > >                            archive /
> > >                            control /
> > >                            distribution /
> > >                            expires /
> > >                            followup-to /
> > >                            injection-date /
> > >                            injection-info /
> > >                            lines /
> > >                            newsgroups /
> > >                            organization /
> > >                            path /
> > >                            summary /
> > >                            supersedes /
> > >                            user-agent /
> > >                            xref
> > >
> > >      The definition of message in Section 3.5 of [RFC5322] is changed to:
> > >
> > >        message       =   *(fields / obs-fields / news-fields)  
> >                            ^  
> > >                          [CRLF body]  
> > 
> > Wouldn't this asterisk introduce the same "infinite loop of empty
> > strings" situation as in the erratum noted above?  
> 
> As "fields" in RFC 5322 amended with erratum 2950 no longer has an 
> infinite loop of empty strings, *(fields / obs-fields / news-fields) 
> also do not have, don't it?

Agreed. Looking at RFC 5322 again I'm no longer sure that there really
was an infinite loop even without erratum 2950 applied.
For an infinite loop of empty strings something like this is required:

   *(*a)  ; Can result in ∞(0a)

Looking at:

   *(trace
     *optional-field /
     *(resent-date /
       resent-from /
       resent-sender /
       resent-to /
       resent-cc /
       resent-bcc /
       resent-msg-id))

The second and third repetition operators are not nested (alternatives)
but the result can reduce to:

   *(trace)

if both of them use zero repetitions. Note that there is no slash after
trace and trace must contain at least one "Received" header field:

   trace  =   [return]
              1*received

Therefore the content in the outer parenthesis can not be empty.

Have I overlooked/misunderstood something?
Can somebody show an example how to create an infinite loop of empty
strings from the original syntax?

-- 
Michael Bäuerle