compare grub efi during build

Bug #1894824 reported by Dimitri John Ledkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2-signed (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Groovy
Fix Released
Undecided
Unassigned

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

Changed in grub2-signed (Ubuntu Groovy):
status: New → Incomplete
status: Incomplete → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Dimitri, or anyone else affected,

Accepted grub2-signed into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/grub2-signed/1.142.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in grub2-signed (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

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: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2-signed - 1.142.6

---------------
grub2-signed (1.142.6) focal; urgency=medium

  * Rebuild against grub2 2.04-1ubuntu26.4.
  * Add check to compare that signed grub, matches monolithic builds, to
    avoid signing skew when copying grub2/grub2-signed to PPAs. LP:
    #1894824

 -- Dimitri John Ledkov <email address hidden> Tue, 08 Sep 2020 11:54:34 +0100

Changed in grub2-signed (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for grub2-signed has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.