From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0F63C3527C for ; Thu, 14 Apr 2022 16:03:52 +0000 (UTC) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) by mx.groups.io with SMTP id smtpd.web09.1128.1649869883367180434 for ; Wed, 13 Apr 2022 10:11:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=StXmCPYs; spf=pass (domain: gmail.com, ip: 209.85.208.181, mailfrom: quaresma.jose@gmail.com) Received: by mail-lj1-f181.google.com with SMTP id r2so2991866ljd.10 for ; Wed, 13 Apr 2022 10:11:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IZA00LBOw4fZnb7KNTDQTjL2MuipeMPiUnra8166Bz4=; b=StXmCPYsmxAwR9IqpqnX4ykYW9wCFVG9p3me3H8oeav6aLxJBlK5iIag6ldpcUF4rP WtZRrSjUzYmpRp0LAg7HC/BmW7EXwvRKWWjeM3qVyTcCldR4OtiAiCIiwr84JyLPKjtE vbOf6uW0LIG0FQf6sOONe9LzWqE9hTyUbQs82lAwNRmkEdFE3PEdW0Wtk9oJzplTbFGq 25sZy09FeFqT0/0bPlmvODGkpbJOAbJrk0cq8PwNGFuQcik/j6ktASLQcp8MNpZ+9kBM 86sXt0Q0ULZ7BY5U1DgF9HlofVBEeDC2XHFTgvjaXbI1KHxg6EkbI9uJvvFDsJxi1e62 oh2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IZA00LBOw4fZnb7KNTDQTjL2MuipeMPiUnra8166Bz4=; b=VIZ0ZIz5QLtfVEUQNj+C7F6ByxzceEgIxI4gVQxzb3vNW4yjbpJdL0DM495ecw1iXB QnHdaOolvjiifYBBE/c6HD2tJ+wAQscsxtZS6zdp9y7gJPf7WLOAII7mHECQDGsDL0Ek T3C4yXsOz4sRAD7zq8349aHSsgOrypsbgeNccffc70pQuafYxlRb5dOQEOkQoL/I0ECJ P8Z2DB7GTE59MqxAfbfS4mHyMCOwJQtseTqsUW0EFBipJOV/vlY++LrBuozW7FMpXFtv AwbljthyC/BWHWAA68TYQkEVG2VGm4+Z1+WN61QBEbpvF5QeY4lXsQfYqi00vEdXusc7 2TVA== X-Gm-Message-State: AOAM532czTNRJ2nm4fHiALCJpzVg1erSfUoOtpiBmRJviNXZXqap0RND /oErYwSGjc0PNqSKEfxWRidXoJptuHRY5TC+eEY= X-Google-Smtp-Source: ABdhPJwbCM/kw3b7H2JGHeIpzSZZXZ1gCs/AzX+gBj+6MICeAdhpg4FALQY8YKPyaBm7iZqx1rqIc9Drn65QShZiLU0= X-Received: by 2002:a2e:aaa5:0:b0:24c:ac53:6f17 with SMTP id bj37-20020a2eaaa5000000b0024cac536f17mr435408ljb.409.1649869879978; Wed, 13 Apr 2022 10:11:19 -0700 (PDT) MIME-Version: 1.0 References: <20220329130741.2430737-1-ross.burton@arm.com> <16E57E79FD292EFA.13992@lists.openembedded.org> In-Reply-To: From: Jose Quaresma Date: Wed, 13 Apr 2022 18:11:07 +0100 Message-ID: Subject: Re: [OE-core] [PATCH][dunfell] zlib: backport the fix for CVE-2018-25032 To: Steve Sakoman Cc: Ralph Siemsen , Ross Burton , "Mittal, Anuj" , Patches and discussions about the oe-core layer Content-Type: multipart/alternative; boundary="0000000000001f300a05dc8c4485" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 14 Apr 2022 16:03:52 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/164347 --0000000000001f300a05dc8c4485 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Steve Sakoman escreveu no dia quarta, 13/04/2022 =C3=A0= (s) 17:02: > On Wed, Apr 13, 2022 at 5:31 AM Steve Sakoman via > lists.openembedded.org > wrote: > > > > On Tue, Apr 12, 2022 at 3:21 PM Ralph Siemsen > wrote: > > > > > > On Tue, Apr 12, 2022 at 5:49 PM Steve Sakoman > wrote: > > > > > > > I added a debug option to the failing command and did another > autobuilder run. > > > > > > > > You can see the output here: > > > > > > > > https://errors.yoctoproject.org/Errors/Details/654608/ > > > > > > Okay, same error, "Hash Sum mismatch". And if I squint between all th= e > > > URL-encoding, I can see the md5/sha1/sha256/sha512sum values. > > > > > > The "apt update" command is doing the following: > > > - fetch the file called "Release" > > > - fetch the file called "Packages.gz" --> error occurs here > > > > > > Looking inside the Release file, it is plain text, and contains the > > > md5/sha1/sha256/sha512 sums of both Packages and Packages.gz (and als= o > > > the first two lines of Release). > > > > > > Manually checking each of those sums reveals an inconsistency: all th= e > > > sha256 values inside Release are incorrect, while all the other > > > md1/sha1/sha512 values are correct. > > > > > > And when we look at the URL-encoded debug info... the sha256 value is > > > the correct one for Packages.gz (as computed manually). However it > > > does not match the (incorrect) value within the Release file. Thus it > > > seems apt-get is justified when it complains about "Hash Sum > > > mismatch". > > > > > > Going back to my Ubuntu system, and looking at the generated Release > > > file... all the checksums are correct, including the sha256sum. > > > > > > So I am now looking into how Release file gets generated... as the > > > problem appears to be there... and it happens on Fedora but not > > > Ubuntu. > > > > As far as I can tell it is done here: > > > > > https://git.yoctoproject.org/poky/tree/meta/lib/oe/package_manager.py?h= =3Ddunfell#n301 > > > > > One additional point to add: on the same Fedora 35 system, I did a > > > full rebuild *without* with xz/gzip CVE fixes, and the apt failure > > > still occurs. To be certain, I nuked cache, sstate-cache and tmp (so > > > basically the entire build directory) and the rebuild took several > > > hours. > > > > Now that is really strange! In my experience it has only appeared > > after adding the zlib or xz CVE fix patches. > > > > I just started two runs on the autobuilder, with the zlib patch as the > > only difference. Both on Fedora 35. > > Both runs completed and I'm still seeing success without the zlib patch: > > https://autobuilder.yoctoproject.org/typhoon/#/builders/50/builds/5069 > > and failure with the patch: > > https://autobuilder.yoctoproject.org/typhoon/#/builders/50/builds/5070 It seems the test that failed is something related with the apt. Is this repo hosted on 192.168.7.5 shared between master and dunfell branches? I ask this because there are some issues with apt [1] on master and it can be related to this. [1] apt: add apt selftest to test signed package feeds) Started HTTPService on 0.0.0.0:35637 Traceback (most recent call last): File "/home/pokybuild/yocto-worker/pkgman-deb-non-deb/build/meta/lib/oeqa/core/d= ecorator/__init__.py", line 36, in wrapped_f return func(*args, **kwargs) File "/home/pokybuild/yocto-worker/pkgman-deb-non-deb/build/meta/lib/oeqa/core/d= ecorator/__init__.py", line 36, in wrapped_f return func(*args, **kwargs) File "/home/pokybuild/yocto-worker/pkgman-deb-non-deb/build/meta/lib/oeqa/core/d= ecorator/__init__.py", line 36, in wrapped_f return func(*args, **kwargs) File "/home/pokybuild/yocto-worker/pkgman-deb-non-deb/build/meta/lib/oeqa/runtim= e/cases/apt.py", line 50, in test_apt_install_from_repo self.pkg('update') File "/home/pokybuild/yocto-worker/pkgman-deb-non-deb/build/meta/lib/oeqa/runtim= e/cases/apt.py", line 17, in pkg self.assertEqual(status, expected, message) AssertionError: 100 !=3D 0 : apt-get update Ign:1 http://192.168.7.5:42261 ./ InRelease Get:2 http://192.168.7.5:42261 ./ Release [1213 B] Ign:3 http://192.168.7.5:42261 ./ Release.gpg Get:4 http://192.168.7.5:42261 ./ Packages [59.3 kB] Err:4 http://192.168.7.5:42261 ./ Packages Hash Sum mismatch Fetched 60.5 kB in 20s (3020 B/s) Reading package lists... W: The repository 'http://192.168.7.5:42261 ./ Release' is not signed. E: Failed to fetch http://192.168.7.5:42261/./Packages.gz Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead. Jose > > Steve > > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > Links: You receive all messages sent to this group. > View/Reply Online (#164339): > https://lists.openembedded.org/g/openembedded-core/message/164339 > Mute This Topic: https://lists.openembedded.org/mt/90107518/5052612 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > quaresma.jose@gmail.com] > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > > --=20 Best regards, Jos=C3=A9 Quaresma --0000000000001f300a05dc8c4485 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

<= div dir=3D"ltr" class=3D"gmail_attr">Steve Sakoman <steve@sakoman.com> escreveu no dia quarta, 13/04/20= 22 =C3=A0(s) 17:02:
On Wed, Apr 13, 2022 at 5:31 AM Steve Sakoman via
lists.openembedded.org <steve=3Dsakoman.com@lists.openembedded.org<= /a>>
wrote:
>
> On Tue, Apr 12, 2022 at 3:21 PM Ralph Siemsen <
ralph.siemsen@linaro.org> = wrote:
> >
> > On Tue, Apr 12, 2022 at 5:49 PM Steve Sakoman <steve@sakoman.com> wrote: > >
> > > I added a debug option to the failing command and did anothe= r autobuilder run.
> > >
> > > You can see the output here:
> > >
> > > https://errors.yoctoproject.org= /Errors/Details/654608/
> >
> > Okay, same error, "Hash Sum mismatch". And if I squint = between all the
> > URL-encoding, I can see the md5/sha1/sha256/sha512sum values.
> >
> > The "apt update" command is doing the following:
> > - fetch the file called "Release"
> > - fetch the file called "Packages.gz" --> error occu= rs here
> >
> > Looking inside the Release file, it is plain text, and contains t= he
> > md5/sha1/sha256/sha512 sums of both Packages and Packages.gz (and= also
> > the first two lines of Release).
> >
> > Manually checking each of those sums reveals an inconsistency: al= l the
> > sha256 values inside Release are incorrect, while all the other > > md1/sha1/sha512 values are correct.
> >
> > And when we look at the URL-encoded debug info... the sha256 valu= e is
> > the correct one for Packages.gz (as computed manually). However i= t
> > does not match the (incorrect) value within the Release file. Thu= s it
> > seems apt-get is justified when it complains about "Hash Sum=
> > mismatch".
> >
> > Going back to my Ubuntu system, and looking at the generated Rele= ase
> > file... all the checksums are correct, including the sha256sum. > >
> > So I am now looking into how Release file gets generated... as th= e
> > problem appears to be there... and it happens on Fedora but not > > Ubuntu.
>
> As far as I can tell it is done here:
>
> https://g= it.yoctoproject.org/poky/tree/meta/lib/oe/package_manager.py?h=3Ddunfell#n3= 01
>
> > One additional point to add: on the same Fedora 35 system, I did = a
> > full rebuild *without* with xz/gzip CVE fixes, and the apt failur= e
> > still occurs. To be certain, I nuked cache, sstate-cache and tmp = (so
> > basically the entire build directory) and the rebuild took severa= l
> > hours.
>
> Now that is really strange!=C2=A0 In my experience it has only appeare= d
> after adding the zlib or xz CVE fix patches.
>
> I just started two runs on the autobuilder, with the zlib patch as the=
> only difference.=C2=A0 Both on Fedora 35.

Both runs completed and I'm still seeing success without the zlib patch= :

https://autobuilder.yoctoproje= ct.org/typhoon/#/builders/50/builds/5069

and failure with the patch:

https://autobuilder.yoctoproje= ct.org/typhoon/#/builders/50/builds/5070

It seems the test that failed is something related with the apt.=C2=A0
Is this repo hosted on 192.168.7.5 shared between=C2=A0master and d= unfell branches?
I ask this because there are some issues with ap= t [1] on master and it can be related to this.

[1]= apt: add=C2=A0apt=C2=A0selftest to test signed package feeds)
Started HTTPService on= 0.0.0.0:35637
Traceback (most recent call last):=
File &qu= ot;/home/pokybuild/yocto-worker/pkgman-deb-non-deb/build/meta/lib/oeqa/core= /decorator/__init__.py", line 36, in wrapped_f
return func(*args, **kwargs)
File "= ;/home/pokybuild/yocto-worker/pkgman-deb-non-deb/build/meta/lib/oeqa/core/d= ecorator/__init__.py", line 36, in wrapped_f
return func(*args, **kwargs)
File "/= home/pokybuild/yocto-worker/pkgman-deb-non-deb/build/meta/lib/oeqa/core/dec= orator/__init__.py", line 36, in wrapped_f
return func(*args, **kwargs)
File "/h= ome/pokybuild/yocto-worker/pkgman-deb-non-deb/build/meta/lib/oeqa/runtime/c= ases/apt.py", line 50, in test_apt_install_from_repo
self.pkg('update'= ;)
File &= quot;/home/pokybuild/yocto-worker/pkgman-deb-non-deb/build/meta/lib/oeqa/ru= ntime/cases/apt.py", line 17, in pkg
self.assertEqual(status, expected, messa= ge)
Asserti= onError: 100 !=3D 0 : apt-get update
Ign:1 http:= //192.168.7.5:42261 ./ InRelease
Get:2 http:= //192.168.7.5:42261 ./ Release [1213 B]
Ign:3 http://192.168.7.5:42261 ./ Release.gpg
Get:4 http://192.168.7.5:42261 ./ Packages [59.3 kB]
<= div style=3D"box-sizing:border-box;height:18px;color:rgb(199,199,199);font-= family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13= px;white-space:pre;background-color:rgb(0,0,0)">Err:4 http://192.168.7.5:42261 ./ Packages
Hash Sum mismatch
Fetched 60.5 kB in 20s= (3020 B/s)
Reading package lists...
W: The repository '= http://192.168.7.5:42261 ./ Release' is not signed.
E: Failed to fetch http://192.168.7.5:42261/./Pack= ages.gz Hash Sum mismatch
E: S= ome index files failed to download. They have been ignored, or old ones use= d instead.
=C2=A0
Jose



Steve

-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
Links: You receive all messages sent to this group.
View/Reply Online (#164339): https:= //lists.openembedded.org/g/openembedded-core/message/164339
Mute This Topic: https://lists.openembedded.org/mt= /90107518/5052612
Group Owner: openembedded-core+owner@lists.openembedded.org<= br> Unsubscribe: https://lists.openembedded.org/= g/openembedded-core/unsub [quaresma.jose@gmail.com]
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-



--
Best regards,

Jos=C3=A9= Quaresma
--0000000000001f300a05dc8c4485--