[Bug 1892792] Re: Causes grub-install to segfault

Launchpad Bug Tracker 1892792 at bugs.launchpad.net
Wed Aug 26 03:56:56 UTC 2020


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 <dannf at ubuntu.com>  Mon, 24 Aug 2020 17:21:15 -0600

** Changed in: efivar (Ubuntu)
       Status: New => Fix Released

-- 
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:
  Causes grub-install to segfault

Status in efivar package in Ubuntu:
  Fix Released

Bug description:
  After updating one of my VMs from 37-2ubuntu4 to 37-4ubuntu1, grub-
  install began to segfault:

  $ sudo grub-install
  Installing for x86_64-efi platform.
  Segmentation fault

  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.

  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.

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