Describe the bug
Using fwupd to update BIOS FW when Secureboot is enabled in UEFI will cause X64 Exception.
Currently tested in fwupd-efi version 1.5 and 1.4 will have the same error, and 1.4 is using fwupd-signed 1.51.1~22.04.1+1.4-0ubuntu0.1 that installed by apt, version 1.5 is released on github.
Steps to Reproduce
Enabled SecureBoot in UEFI.
Run following command to update fw in OS
sudo fwupdmgr install fw.cab --allow-older
Then reboot.
First time reboot POST will pop up fwupd-efi version 1.5, then reboot again.
At seconed reboot, system will freeze on POST, and if we redirect output to COM1, we would see X64 Exception Type information.
Expected behavior
Copyright (C) AMI
BIOS Date: 12/27/2023 12:25:05
iEP-5010G UEFI P1.40A
Press F2 or DEL to run Setup.
Press F11 for Boot Menu...
/efi/fwupdate.c:562:efi_main(): fwupd-efi version 1.5
../efi/fwup-efi.c:28:fwup_delete_variable(): Could not get variable 'FWUPDATE_DEBUG_LOG' for delete: Invalid Parameter
../efi/fwupdate.c:168:fwup_populate_update_table(): Found update fwupd-20a7abc8-0b0b-423f-9d9e-8e9587819db6-0
../efi/fwupdate.c:595:efi_main(): Adding new capsule
../efi/fwupdate.c:208:fwup_search_file(): Searching Device Path: HD(1,GPT,716223 75-F712-4D00-9A01-2824B45C0D03)/\EFI\ubuntu\fw\fwupd-20a7abc8-0b0b-423f-9d9e-8e9587819db6.cap...
../efi/fwupdate.c:228:fwup_search_file(): Device Path prepared: HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03)
../efi/fwupdate.c:238:fwup_search_file(): Device supporting SFSP: PciRoot(0)/Pci(0x14,0x0)/Usb(0xE,0x0)/HD(1,MBR,0x56BE7545)
../efi/fwupdate.c:241:fwup_search_file(): Comparing: HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03) and PciRoot(0)/Pci(0x14,0x0)/Usb(0xE,0x0)/HD(1,MBR,0x56BE7545)
../efi/fwupdate.c:241:fwup_search_file(): Comparing: HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03) and Pci(0x14,0x0)/Usb(0xE,0x0)/HD(1,MBR,0x56BE7545)
../efi/fwupdate.c:241:fwup_search_file(): Comparing: HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03) and Usb(0xE,0x0)/HD(1,MBR,0x56BE7545)
../efi/fwupdate.c:241:fwup_search_file(): Comparing: HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03) and HD(1,MBR,0x56BE7545)
../efi/fwupdate.c:238:fwup_search_file(): Device supporting SFSP: PciRoot(0)/Pci(0x17,0x0)/Sata(0x0,0xFFFF,0x0)/HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03)
../efi/fwupdate.c:241:fwup_search_file(): Comparing: HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03) and PciRoot(0)/Pci(0x17,0x0)/Sata(0x0,0xFFFF,0x0)/HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03)
../efi/fwupdate.c:241:fwup_search_file(): Comparing: HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03) and Pci(0x17,0x0)/Sata(0x0,0xFFFF,0x0)/HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03)
../efi/fwupdate.c:241:fwup_search_file(): Comparing: HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03) and Sata(0x0,0xFFFF,0x0)/HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03)
../efi/fwupdate.c:241:fwup_search_file(): Comparing: HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03) and HD(1,GPT,71622375-F712-4D00-9A01-2824B45C0D03)
../efi/fwupdate.c:250:fwup_search_file(): Match up! Returning \EFI\ubuntu\fw\fwupd-20a7abc8-0b0b-423f-9d9e-8e9587819db6.cap
../efi/fwupdate.c:310:fwup_open_file(): Found device
../efi/fwupdate.c:317:fwup_open_file(): Found volume
../efi/fwupdate.c:325:fwup_open_file(): Found file
../efi/fwupdate.c:425:fwup_add_update_capsule(): Read file; 33558528 bytes
../efi/fwupdate.c:426:fwup_add_update_capsule(): updates guid: 20A7ABC8-0B0B-423F-9D9E-8E9587819DB6
../efi/fwupdate.c:427:fwup_add_update_capsule(): File guid: 20A7ABC8-0B0B-423F-9D9E-8E9587819DB6
../efi/fwupdate.c:611:efi_main(): n_updates: 1
../efi/fwupdate.c:468:fwup_apply_capsules(): QueryCapsuleCapabilities: Success max: 104857600 reset:1
../efi/fwupdate.c:477:fwup_apply_capsules(): Capsules: 1
Copyright (C) AMI
BIOS Date: 12/27/2023 12:25:05
iEP-5010G UEFI P1.40A
Press F2 or DEL to run Setup.
Press F11 for Boot Menu.!!!! X64 Exception Type - 0D(#GP - General Protection) CPU Apic ID - 00000000 !!!!
ExceptionData - 0000000000000000
RIP - 0000000047660AEC, CS - 0000000000000038, RFLAGS - 0000000000010282
RAX - 00000000481AF2F0, RCX - 0000000000000000, RDX - 0000000040590FE0
RBX - 000000004189A000, RSP - 000000004057BB80, RBP - 000000004057BC10
RSI - 0000000000000000, RDI - 00000000439C7F98
R8 - 000000004057BB28, R9 - 0000000046DA9F98, R10 - 0000000000000001
R11 - 000000004057BA10, R12 - 0000000000001000, R13 - 0000000000000004
R14 - 00000000000000B3, R15 - 00000000000001C0
DS - 0000000000000030, ES - 0000000000000030, FS - 0000000000000030
GS - 0000000000000030, SS - 0000000000000030
CR0 - 0000000080010013, CR2 - 0000000000000000, CR3 - 0000000040001000
CR4 - 0000000000000668, CR8 - 0000000000000000
DR0 - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000
DR3 - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400
GDTR - 000000004ABBFE98 0000000000000047, LDTR - 0000000000000000
IDTR - 0000000045982018 0000000000000FFF, TR - 0000000000000000
FXSAVE_STATE - 000000004057B7E0
!!!! Can't find image information. !!!!
Describe the bug Using fwupd to update BIOS FW when Secureboot is enabled in UEFI will cause X64 Exception.
Currently tested in fwupd-efi version 1.5 and 1.4 will have the same error, and 1.4 is using fwupd-signed 1.51.1~22.04.1+1.4-0ubuntu0.1 that installed by apt, version 1.5 is released on github.
Steps to Reproduce
sudo fwupdmgr install fw.cab --allow-older
Expected behavior
fwupd version information
Please note how you installed it (
apt
,dnf
,pacman
, source, etc): apt**fwupd device information**
asri@asri-iEP-5010G:~$ fwupdmgr get-devices --show-all-devices iEP-5010G │ ├─Atom x6416RE Processor @ 1.70GHz: │ Device ID: 4bde70ba4e39b28f9eab1628f9dd6e6244c03027 │ Current version: 0x00000017 │ Vendor: Intel │ GUIDs: b9a2dd81-159e-5537-a7db-e7101d164d3f │ 30249f37-d140-5d3e-9319-186b1bd5cac3 │ 77d755a9-0480-5d56-b15e-d64f060b0c21 │ 16c0e6c3-2596-5917-b4f0-57f2acd7134c │ Device Flags: • Internal device │ ├─Display controller: │ Device ID: 5792b48846ce271fab11c4a545f7a3df0d36e00a │ Current version: 01 │ Vendor: Intel Corporation (PCI:0x8086) │ GUIDs: 493765bc-f11d-58a4-b821-cddc75972ebd │ 973ee0b5-ae5f-5413-826c-f08a87799b54 │ 72bd7319-b834-5431-a44e-dd099a97d938 │ 915dbec3-a205-5d56-a327-bbcd98d1a9c9 │ Device Flags: • Internal device │ • Cryptographic hash verification is available │ ├─SM4032GPTCJGSBAST-S111: │ Device ID: 5dbeb140337f610d54913c0f43d15fdaa0eafb51 │ Summary: ATA drive │ Current version: SBFMP1.5 │ Vendor: Phison (ATA:0x1987) │ GUIDs: bd439cda-80e4-54ed-aa31-2b6eaecb590d │ 90f87ae4-e025-58a8-858c-aa8893dcc38f │ 96b1f61a-6a98-5760-94ee-78b936357dc2 │ Device Flags: • Internal device │ • Updatable │ • System requires external power source │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ ├─System Firmware: │ │ Device ID: a45df35ac0e948ee180fe216a5f703f32dda163f │ │ Summary: UEFI ESRT device │ │ Current version: 140 │ │ Minimum Version: 140 │ │ Vendor: ASRock Industrial (DMI:American Megatrends International, LLC.) │ │ Update State: Failed │ │ Update Error: failed to update to 140: unsuccessful │ │ GUIDs: 20a7abc8-0b0b-423f-9d9e-8e9587819db6 │ │ 230c8b18-8d9b-53ec-838b-6cfc0383493a │ │ Device Flags: • Internal device │ │ • Updatable │ │ • System requires external power source │ │ • Needs a reboot after installation │ │ • Cryptographic hash verification is available │ │ • Device is usable for the duration of the update │ │ │ └─UEFI dbx: │ Device ID: 362301da643102b9f38477387e2193e57abaa590 │ Summary: UEFI revocation database │ Current version: 77 │ Minimum Version: 77 │ Vendor: UEFI:Linux Foundation │ Install Duration: 1 second │ GUIDs: c6682ade-b5ec-57c4-b687-676351208742 │ f8ba2887-9411-5c36-9cee-88995bb39731 │ Device Flags: • Internal device │ • Updatable │ • Needs a reboot after installation │ • Only version upgrades are allowed │ • Signed Payload │ ├─TPM: │ Device ID: c6a80ac3a22083423992a3cb15018989f37834d6 │ Current version: 7.85.17.51968 │ Vendor: Infineon (TPM:IFX) │ GUIDs: ff71992e-52f7-5eea-94ef-883e56e034c6 │ 5eebb112-75ad-5536-b173-a11eb3399402 │ ddf995da-1b32-5a8a-bc1b-8d5af4b38b51 │ 6d81ab63-db2e-50ac-934f-6be9accf5e02 │ 301555de-680d-5ddc-b995-7553fc9138f1 │ Device Flags: • Internal device │ ├─UEFI Device Firmware: │ Device ID: 349bb341230b1a86e5effe7dfe4337e1590227bd │ Summary: UEFI ESRT device │ Current version: 2735 │ Vendor: DMI:American Megatrends International, LLC. │ Update State: Success │ GUID: 0eab05c1-766a-4805-a039-3081de0210c7 │ Device Flags: • Internal device │ • Updatable │ • System requires external power source │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ ├─UEFI Device Firmware: │ Device ID: 2292ae5236790b47884e37cf162dcf23bfcd1c60 │ Summary: UEFI ESRT device │ Current version: 1 │ Vendor: DMI:American Megatrends International, LLC. │ Update State: Success │ GUID: 697f0ea1-b630-4b93-9b08-eaffc5d5fc45 │ Device Flags: • Internal device │ • Updatable │ • System requires external power source │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ ├─UEFI Device Firmware: │ Device ID: f95c9218acd12697af946874bfe4239587209232 │ Summary: UEFI ESRT device │ Current version: 1 │ Vendor: DMI:American Megatrends International, LLC. │ Update State: Success │ GUID: aad1e926-23b8-4c3a-8b44-0c9a031664f2 │ Device Flags: • Internal device │ • Updatable │ • System requires external power source │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ ├─UEFI Device Firmware: │ Device ID: d96de5c124b60ed6241ebcb6bb2c839cb5580786 │ Summary: UEFI ESRT device │ Current version: 1 │ Vendor: DMI:American Megatrends International, LLC. │ Update State: Success │ GUID: 90c9751d-fa74-4ea6-8c4b-f44d2be8cd4b │ Device Flags: • Internal device │ • Updatable │ • System requires external power source │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ ├─UEFI Device Firmware: │ Device ID: f37fb01122dd62c773f4e84ec89737e059712d59 │ Summary: UEFI ESRT device │ Current version: 1 │ Vendor: DMI:American Megatrends International, LLC. │ Update State: Success │ GUID: 6fee88ff-49ed-48f1-b77b-ead15771abe7 │ Device Flags: • Internal device │ • Updatable │ • System requires external power source │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ ├─UEFI Device Firmware: │ Device ID: 36efb79c255f402f619fa9eb53cd659db51f2a04 │ Summary: UEFI ESRT device │ Current version: 1 │ Vendor: DMI:American Megatrends International, LLC. │ Update State: Success │ GUID: 9a069a23-836f-41df-af02-f14bec97de72 │ Device Flags: • Internal device │ • Updatable │ • System requires external power source │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ ├─UEFI Device Firmware: │ Device ID: 11a7fbdd09ce583e58b899660fe10f147fd155a2 │ Summary: UEFI ESRT device │ Current version: 1 │ Vendor: DMI:American Megatrends International, LLC. │ Update State: Success │ GUID: b0d0314d-57c3-4453-9486-18822d8c81ba │ Device Flags: • Internal device │ • Updatable │ • System requires external power source │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ ├─UEFI Device Firmware: │ Device ID: a083ebc5138e5e071ef7270cc9a8280722cc7adf │ Summary: UEFI ESRT device │ Current version: 1 │ Vendor: DMI:American Megatrends International, LLC. │ Update State: Success │ GUID: bf2ae378-01e0-4605-9e3b-2ee2fc7339de │ Device Flags: • Internal device │ • Updatable │ • System requires external power source │ • Needs a reboot after installation │ • Device is usable for the duration of the update │ └─UEFI Device Firmware: Device ID: 5bfc5b91c18ef8b751d3d052af77b69ebf738038 Summary: UEFI ESRT device Current version: 1 Vendor: DMI:American Megatrends International, LLC. Update State: Success GUID: a7ee90b1-fb4a-4478-b868-367ee9ec97e2 Device Flags: • Internal device • Updatable • System requires external power source • Needs a reboot after installation • Device is usable for the duration of the updateSystem UEFI configuration
Additional questions