[Bug 1892792] Re: grub-install fails due to uninitialized variable

dann frazier 1892792 at bugs.launchpad.net
Tue Nov 17 18:10:44 UTC 2020


** Description changed:

- After updating one of my VMs from 37-2ubuntu4 to 37-4ubuntu1, grub-
- install began to segfault:
+ [Impact]
+ grub-install can fail, either by segfaulting or reporting an Internal Error.
  
- $ sudo grub-install
- Installing for x86_64-efi platform.
- Segmentation fault
+ [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.
  
- gdb shows the backtrace in parse_acpi_root():
- (gdb) bt
- #0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
- #1  0x00007ffff7ef30c6 in parse_acpi_root (dev=0x55555578b960, 
-     current=0x55555582ae80 "../../devices/pci0000:00/0000:00:01.1/0000:02:00.0/virtio1/block/vda", root=<optimized out>) at linux-acpi-root.c:74
- #2  0x00007ffff7ef60fd in device_get (fd=fd at entry=6, 
-     partition=partition at entry=15) at linux.c:460
- #3  0x00007ffff7ef85dd in efi_va_generate_file_device_path_from_esp (buf=0x0, 
-     size=0, devpath=0x55555569ad20 "/dev/vda", partition=15, 
-     relpath=0x555555647f06 "", options=2, ap=0x7fffffffdd90) at creator.c:192
- #4  0x00007ffff7ef95dd in efi_generate_file_device_path_from_esp (
-     buf=<optimized out>, size=<optimized out>, devpath=<optimized out>, 
-     partition=<optimized out>, relpath=<optimized out>, 
-     options=<optimized out>) at creator.c:342
- #5  0x00005555555755b1 in ?? ()
- #6  0x0000555555575c2d in ?? ()
- #7  0x00005555555622d6 in ?? ()
- #8  0x00007ffff7d1d0b3 in __libc_start_main (main=0x5555555602f0, argc=1, 
-     argv=0x7fffffffe698, init=<optimized out>, fini=<optimized out>, 
-     rtld_fini=<optimized out>, stack_end=0x7fffffffe688)
-     at ../csu/libc-start.c:308
- #9  0x0000555555562d4e in ?? ()
- 
- 
- By backing patches out, I found that it was caused by debian/patches/remove-arrows.patch. In a few places, like in parse_acpi_root(), that patch dropped the initialization of the pos variable.
- 
+ [Fix]
  This upstream patch fixes it:
  https://github.com/rhboot/efivar/commit/5dc12cc56c79d293cf68d12a0b84373a785745e7
  
- Note that we also carried that patch in 37-2ubuntu4. However, the
- segfault only seems to occur when compiled with GCC 10, which happened
- first w/ 37-4ubuntu1.
+ [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).

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

Title:
  grub-install fails due to uninitialized variable

Status in efivar package in Ubuntu:
  Fix Released
Status in efivar source package in Focal:
  In Progress

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).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/efivar/+bug/1892792/+subscriptions



More information about the foundations-bugs mailing list