diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index 4d1bc83562..e555183959 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -2402,7 +2402,9 @@ static EFI_STATUS image_start( if (err != EFI_SUCCESS) return log_error_status_stall(err, L"Error loading %s: %r", entry->loader, err); - if (entry->devicetree) { + /* DTBs are loaded by the kernel before ExitBootServices, and they can be used to map and assign + * arbitrary memory ranges, so skip it when secure boot is enabled as the DTB here is unverified. */ + if (entry->devicetree && !secure_boot_enabled()) { err = devicetree_install(&dtstate, image_root, entry->devicetree); if (err != EFI_SUCCESS) return log_error_status_stall(err, L"Error loading %s: %r", entry->devicetree, err);