Bug 233911 - efibootmgr(8) segfaults when passed an invalid kernel path
Summary: efibootmgr(8) segfaults when passed an invalid kernel path
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Rebecca Cran
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-10 20:12 UTC by Rebecca Cran
Modified: 2021-07-29 15:30 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rebecca Cran freebsd_committer freebsd_triage 2018-12-10 20:12:47 UTC
When efibootmgr is run and passed an invalid kernel, it segfaults when built with the default -O2 optimizations.

For example:

efibootmgr -c -L "FreeBSD" -l /mnt/efi/freebsd/LOADER.EFI -k /boot/kernel/kernel
Segmentation fault

If rebuilt with -O0, it produces the expected error message that it can't translate the kernel path to a UEFI path.