grub-install fails due to uninitialized variable

Bug #1892792 reported by dann frazier
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
efivar (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
dann frazier

Bug Description

[Impact]
grub-install can fail, either by segfaulting or reporting an Internal Error.

[Test Case]
The issue is due to an uninitialized variable, so reproducing it is somewhat unpredictable (depends what randomness is in memory). However, a user seems to have a reliable reproduction setup as reported in LP: #1904226.

[Fix]
This upstream patch fixes it:
https://github.com/rhboot/efivar/commit/5dc12cc56c79d293cf68d12a0b84373a785745e7

[Where problems could occur]
Most likely a problem with this fix would have little to do with the fix itself (which is simple/obvious), so I'll just state the usual issues/problems that can occur with upgrading packages (e.g. disk too full to unpack, etc).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package efivar - 37-4ubuntu2

---------------
efivar (37-4ubuntu2) groovy; urgency=medium

  * Cherrypick upstream patch to fix uninitialized variable in
    parse_acpi_root(), which can lead to a segfault when calling
    grub-install. LP: #1892792.

 -- dann frazier <email address hidden> Mon, 24 Aug 2020 17:21:15 -0600

Changed in efivar (Ubuntu):
status: New → Fix Released
Revision history for this message
Steven Clarkson (sclarkson) wrote :

This same bug now applies to the focal release as of the 37-2ubuntu2.1 package. However it does not segfault, the parser simply fails.

$ grub-install /dev/nvme0n1 --target=x86_64-efi --efi-directory=/boot/efi
Installing for x86_64-efi platform.
grub-install: warning: Internal error.
grub-install: error: failed to register the EFI boot entry: Operation not permitted.

This patch should be backported to the focal-updates release, as well.

Also reported in LP: #1904226

dann frazier (dannf)
summary: - Causes grub-install to segfault
+ grub-install fails due to uninitialized variable
Changed in efivar (Ubuntu Focal):
status: New → In Progress
assignee: nobody → dann frazier (dannf)
dann frazier (dannf)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello dann, or anyone else affected,

Accepted efivar into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/efivar/37-2ubuntu2.2 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 efivar (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Steven Clarkson (sclarkson) wrote :

With 37-2ubuntu2.1

$ sudo grub-install
Installing for x86_64-efi platform.
grub-install: warning: Internal error.
grub-install: error: failed to register the EFI boot entry: Operation not permitted.

And with 37-2ubuntu2.2

$ sudo grub-install
Installing for x86_64-efi platform.
Installation finished. No error reported.

Looks like the issue has been resolved.

tags: added: 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 efivar - 37-2ubuntu2.2

---------------
efivar (37-2ubuntu2.2) focal; urgency=medium

  * Cherrypick upstream patch to fix uninitialized variable in
    parse_acpi_root(), which can lead to a segfault when calling
    grub-install. LP: #1892792.

 -- dann frazier <email address hidden> Mon, 16 Nov 2020 17:25:19 -0700

Changed in efivar (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for efivar 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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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