Commit Graph

13 Commits

Author SHA1 Message Date
Mario Limonciello
73cdf067ed trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
Richard Hughes
1981c63d58 Remove FuFirmwareImage and just use FuFirmware instead
This allows us to 'nest' firmware formats, and removes a ton of duplication.

The aim here is to deprecate FuFirmwareImage -- it's almost always acting
as a 'child' FuFirmware instance, and even copies most of the vfuncs to allow
custom types. If I'm struggling to work out what should be a FuFirmware and
what should be a FuFirmwareImage then a plugin author has no hope.

For simple payloads we were adding bytes into an image and then the image into
a firmware. This gets really messy when most plugins are treating the FuFirmware
*as* the binary firmware file.

The GBytes saved in the FuFirmware would be considered the payload with the
aim of not using FuFirmwareImage in the single-image case.
2021-03-09 21:14:12 +00:00
Richard Hughes
fdb3a83a20 uefi-dbx: Ignore the legacy OVMF dummy GUID for the version
This was changed recently in https://sourceforge.net/p/edk2/code/29270/
2021-01-08 14:54:31 +00:00
Richard Hughes
5c9b1fcc81 Only include the start year in the copyright header
The end year is legally and functionally redundant, and more importantly causes
cherry-pick conflicts when trying to maintain old branches. Use git for history.
2021-01-07 14:48:16 +00:00
Richard Hughes
5c9e9f17c5 libfwupdplugin: Export FuEfiSignatureList for plugins to use 2021-01-05 16:42:58 +00:00
Richard Hughes
fcb5667d79 libfwupdplugin: Subclass FuFirmware in FuEfiSignatureList
This allows us to get fuzzing support 'for free' and also simplifies the code.
2021-01-05 14:45:31 +00:00
Richard Hughes
c1e5f94e5c Mark more user-visible strings as translatable
Fixes https://github.com/fwupd/fwupd/issues/2616
2020-11-29 07:09:31 +00:00
Richard Hughes
58ba785915 Install the new dbx utility as fwupdbxtool 2020-08-18 17:34:26 +01:00
Richard Hughes
1abb32c623 uefi-dbx: Validate the dbx update is safe to apply
To do this mount all ESP partitions and check all the binaries there to see if
they match any entries in the new dbx. If we applied the update when a hash
matched, we would unintentially 'brick' the users machine, as the grub and shim
binaries *have* to be updated first.

This functionality does reimplement the PE hashing functionality found in
sbsigntools and pesign. This was done for 4 main reasons:

 * There were some memory safety issues found when fuzzing random binaries
 * Executing the tools hundreds of times was a lot of overhead
 * Operating from a blob of immutable mmap'd memory is much faster
 * We only need a very small amount of functionality from both tools
2020-08-17 15:59:02 +01:00
Richard Hughes
0e7102c4f8 uefi-dbx: Fix some NULL/FALSE confusion 2020-08-17 14:47:58 +01:00
Richard Hughes
01d5779597 uefi-dbx: Allow updating the dbx using the LVFS
The GUID is built using the SHA256 of the certificates in the KEK.
2020-08-14 13:22:53 +01:00
Richard Hughes
edc3432338 dbxtool: List the checksums correctly for multiple EFI_SIGNATURE_LISTs
Fixes https://github.com/fwupd/fwupd/issues/2319
2020-08-13 21:19:10 +01:00
Richard Hughes
361114784b Add a compatible re-implementation of the rhboot dbxtool 2020-08-13 19:09:40 +01:00