[Bug 1894824] Re: compare grub efi during build

Dimitri John Ledkov 1894824 at bugs.launchpad.net
Tue Sep 15 10:09:40 UTC 2020


I've triggered many successful builds, where grub2 deb & signing
artefacts matched, and thus build succeeded.

To produce the race of missmatched grub2 deb & signing artefacts I did
the following:

1) edit-acl on a ppa release pocket and self grant admin rights to myself
2) copy .deb from focal-proposed into said ppa
3) whilst signing tarball is still in Accepted queue, use queue tool with '-e' option to filter and reject signing tarball.

This resulted in a PPA that has the latest .deb, but will never have
matching signing.

4) copy source-only grub2-signed into said PPA

Expecting a failure to build from source, as the archive that had the
candidate deb, did not have matching signing.

make[1]: Entering directory '/<<PKGBUILDDIR>>'
cmp current/grubx64.efi /usr/lib/grub/x86_64-efi/monolithic/grubx64.efi
current/grubx64.efi /usr/lib/grub/x86_64-efi/monolithic/grubx64.efi differ: byte 162, line 2
make[1]: *** [Makefile:27: check] Error 1

And it failed correctly.

Successful builds are visibile in the Ubuntu Archive proposed it self.
Thus the build-time check now works correctly.

** Tags removed: verification-needed verification-needed-focal
** Tags added: verification-done verification-done-focal

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2-signed in Ubuntu.
https://bugs.launchpad.net/bugs/1894824

Title:
  compare grub efi during build

Status in grub2-signed package in Ubuntu:
  Fix Released
Status in grub2-signed source package in Focal:
  Fix Committed
Status in grub2-signed source package in Groovy:
  Fix Released

Bug description:
  [Impact]

   * When resigning grub in a PPA, one can satisfy the build-depends from the main Ubuntu Archive, without PPA signature ready yet.
   * In such cases, grub2-signed is missbuilt with signature from an old PPA build attached to a newer binary, resulting in validation errors.
   * Add a check to ensure that signed grub & build-depends grub are the same

  [Test Case]

   * Copy grub2 from -updates into PPA and await signing
   * Copy grub2-signed from Ubuntu Archive -proposed into PPA
   * Observe that grub2-signed FTBFS, instead of successfully producing uninstallable/unverifiable debs
   * Copy grub2 from -proposed into PPA, and await signing
   * Retry grub2-signed build, which should now succeed

  [Regression Potential]

   * Only a build-time quickcheck is added, without any other changes of
  how signed grub efi images are assembled.

  [Other Info]
   
   * Previously this issue resulted in miss built UC20 grub copies

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2-signed/+bug/1894824/+subscriptions



More information about the foundations-bugs mailing list