lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220531195944.a4gyevqfxdafo5qa@pengutronix.de>
Date:   Tue, 31 May 2022 21:59:44 +0200
From:   Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To:     David Woodhouse <dwmw2@...radead.org>
Cc:     Geert Uytterhoeven <geert@...ux-m68k.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        mark@...piro.net, workflows@...r.kernel.org,
        Konstantin Ryabitsev <konstantin@...uxfoundation.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        MTD Maling List <linux-mtd@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Arnd Bergmann <arnd@...db.de>,
        Miquel Raynal <miquel.raynal@...tlin.com>
Subject: Re: Getting rid of infradead.org - corrupted subjects

Hello,

On Wed, May 25, 2022 at 09:23:32PM +0200, Uwe Kleine-König wrote:
> On Wed, May 25, 2022 at 10:55:18AM +0100, David Woodhouse wrote:
> > On Wed, 2022-05-25 at 10:34 +0200, Geert Uytterhoeven wrote:
> > > CC dwmw2
> > 
> > Thanks, Geert.
> > 
> > > On Wed, May 25, 2022 at 10:07 AM Krzysztof Kozlowski
> > > <krzysztof.kozlowski@...aro.org> wrote:
> > > 
> > > > The address list is semi-random as I don't know whom to approach.
> > > > Problem: infradead.org corrupts email subjects by changing:
> > > > s/,/, /
> > 
> > I found an old thread on mailman-users which appears to be claiming
> > that it's just standard folding as described in RFC2822 §2.2.3.
> > 
> > https://mail.python.org/pipermail/mailman-users/2007-May/057119.html
> > 
> > 2.2.3. Long Header Fields
> > 
> >    Each header field is logically a single line of characters comprising
> >    the field name, the colon, and the field body.  For convenience
> >    however, and to deal with the 998/78 character limitations per line,
> >    the field body portion of a header field can be split into a multiple
> >    line representation; this is called "folding".  The general rule is
> >    that wherever this standard allows for folding white space (not
> >    simply WSP characters), a CRLF may be inserted before any WSP.  For
> >    example, the header field:
> > 
> >            Subject: This is a test
> > 
> >    can be represented as:
> > 
> >            Subject: This
> >             is a test
> > 
> > But this is folding at a *comma*, not at whitespace. The original
> > subject line was (in a single line):
> > 
> > Subject: [PATCH v2] dt-bindings: mtd: jedec,spi-nor: remove unneeded properties
> > 
> > ... and Mailman 'folded' it in the wrong place to:
> > 
> > Subject: [PATCH v2] dt-bindings: mtd: jedec,
> >  spi-nor: remove unneeded properties
> > 
> > That *isn't* proper folding because it didn't happen at a whitespace.
> > 
> > I do need to upgrade to Mailman 3 at some point; I've been
> > procrastinating on the basis that it "ain't broke". For the time being
> > I've just disabled folding in MM2 with a trivial hack:
> > 
> > --- Message.py.orig	2022-05-25 02:51:05.917145192 -0700
> > +++ Message.py	2022-05-25 02:50:44.137142069 -0700
> > @@ -49,7 +49,7 @@ class Generator(email.Generator.Generato
> >         Headers will by default _not_ be folded in attachments.
> >      """
> >      def __init__(self, outfp, mangle_from_=True,
> > -                 maxheaderlen=78, children_maxheaderlen=0):
> > +                 maxheaderlen=0, children_maxheaderlen=0):
> >          email.Generator.Generator.__init__(self, outfp,
> >                  mangle_from_=mangle_from_, maxheaderlen=maxheaderlen)
> >          self.__children_maxheaderlen = children_maxheaderlen
> 
> For the record: Some time ago I debugged that myself, too and found an
> equivalent change. So this looks good to me.

small supplement: I found the change I did back then:

--- /usr/lib/python2.7/email/header.py    2018-09-26 20:42:22.000000000 +0200
+++ /usr/lib/python2.7/email/header.py    2018-09-26 20:42:22.000000000 +0200
@@ -371,7 +371,7 @@
         joiner = NL + self._continuation_ws
         return joiner.join(chunks)

-    def encode(self, splitchars=';, '):
+    def encode(self, splitchars=' '):
         """Encode a message header into an RFC-compliant format.

         There are many issues involved in converting a given string for use in

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ