[uefi] add detection and warning for revoked bootloaders

* Considering that alerting users to potential security breaches that may be
  exploited by boot media should also be performed by application that create
  them, we add detection for all the currently known revoked UEFI bootloaders,
  be it the ones from the official UEFI DBX as well as the ones from Windows'
  SkuSiPolicy.p7b, and warn the user when one such bootloader is detected on
  their source media.
* Note that, to actually be revoked, the bootloaders flagged through SkuSiPolicy
  require the copying of the .p7b to the boot media, which we are currently
  not enacting but will perform in a subsequent commit.
* Also fix a Coverity warning in hash.c.
This commit is contained in:
Pete Batard 2023-06-16 20:33:38 +02:00
parent c4b1b23832
commit 43764268de
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
8 changed files with 3168 additions and 17 deletions

View file

@ -86,15 +86,15 @@ BOOL enable_iso = TRUE, enable_joliet = TRUE, enable_rockridge = TRUE, has_ldlin
#define ISO_BLOCKING(x) do {x; iso_blocking_status++; } while(0)
static const char* psz_extract_dir;
static const char* bootmgr_name = "bootmgr";
static const char* bootmgr_efi_name = "bootmgr.efi";
const char* bootmgr_efi_name = "bootmgr.efi";
static const char* grldr_name = "grldr";
static const char* ldlinux_name = "ldlinux.sys";
static const char* ldlinux_c32 = "ldlinux.c32";
static const char* md5sum_name[] = { "MD5SUMS", "md5sum.txt" };
static const char* casper_dirname = "/casper";
static const char* proxmox_dirname = "/proxmox";
static const char* efi_dirname = "/efi/boot";
static const char* efi_bootname[ARCH_MAX] = {
const char* efi_dirname = "/efi/boot";
const char* efi_bootname[ARCH_MAX] = {
"boot.efi", "bootia32.efi", "bootx64.efi", "bootarm.efi", "bootaa64.efi", "bootia64.efi",
"bootriscv32.efi", "bootriscv64.efi", "bootriscv128.efi", "bootebc.efi" };
static const char* sources_str = "/sources";