diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2021-08-04 10:46:45 +0200 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2021-10-12 10:50:44 -0400 |
| commit | b43758465a553d289b9f92aa5892244f19c1a76d (patch) | |
| tree | f3cf565582d9bacccd96987ec77d4b7817c4d002 /shim.c | |
| parent | 7cbf1184b612b71e06a3750fe827a94caf726cc7 (diff) | |
| download | efi-boot-shim-b43758465a553d289b9f92aa5892244f19c1a76d.tar.gz efi-boot-shim-b43758465a553d289b9f92aa5892244f19c1a76d.zip | |
shim: Don't parse load options if invoked from removable media path
We see various reports of boot failures because the generated
boot entries contain garbage/tagging that we do not expect, and
that we then parse as a second stage boot loader.
Diffstat (limited to 'shim.c')
| -rw-r--r-- | shim.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -1170,6 +1170,17 @@ EFI_STATUS set_second_stage (EFI_HANDLE image_handle) return efi_status; } +#if defined(DISABLE_REMOVABLE_LOAD_OPTIONS) + /* + * boot services build very strange load options, and we might misparse them, + * causing boot failures on removable media. + */ + if (is_removable_media_path(li)) { + dprint("Invoked from removable media path, ignoring boot options"); + return EFI_SUCCESS; + } +#endif + efi_status = parse_load_options(li); if (EFI_ERROR(efi_status)) { perror (L"Failed to get load options: %r\n", efi_status); |
