public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 00/17] efi_loader: rework/improve UEFI secure boot code
@ 2020-06-09  5:09 AKASHI Takahiro
  2020-06-09  5:09 ` [PATCH v2 01/17] efi_loader: change efi objects initialization order AKASHI Takahiro
                   ` (16 more replies)
  0 siblings, 17 replies; 33+ messages in thread
From: AKASHI Takahiro @ 2020-06-09  5:09 UTC (permalink / raw)
  To: u-boot

Summary
=======
I'm currently working on reworking UEFI secure boot, aiming to add
"intermediate certificates" support. In this effort, I found a couple
of issues that should immediately be fixed or useful improvements even
without intermediate certificates support.

Each commit in this patch series has self-explained description of
the issue to be addressed.
While they are independent in terms of functionality, they are compiled
in a set since the one may depend on the other in terms of code change
overlap. All the changes can and should be merged at once for best
convenience.

I hope that I will post intermediate certificates support sometime
in the next week.

Patch structure
===============
Patch#1-#5,#9: rather preparatory patches
Patch#6-#8,#10-#11: main commits
Patch#12-#17: pytests
  Patch#15-#16 for Patch#10
  Patch#17 for Patch#11

Prerequisite
============
The version of "sbsign" command must be 0.7 or higher to sign an image
with multiple signatures. It is required here for testing.

Test
====
- The added new pytests in test_signed.py passed locally.
- Travis CI passed, except Test Case 5 for signed image
  (test_efi_signed_image_auth5) because the version of "sbsign" command
  is old and it doesn't support multiple signatures.

v2 (Jun 9, 2020)
* on top of v2020.07-rc4
* add patch#1,#2 to remove unnecessary hacks in pytest
* use EFI_PRINT() instead of debug() everywhere (patch#3-#5)
* fix a verification logic so that we should reject an image if, at least,
  one of signaures be verified by dbx. New efi_signature_verify_one() has
  a main role. (patch#10)
* use "llu" format instead of "llx" to print out the revocation time
  (patch#10)
* add some description about verification logic against multiple signatures
  (patch#11)

v1 (May 29, 2020)
* initial release

AKASHI Takahiro (17):
  efi_loader: change efi objects initialization order
  Revert "test: stabilize test_efi_secboot"
  efi_loader: signature: replace debug to EFI_PRINT
  efi_loader: variable: replace debug to EFI_PRINT
  efi_loader: image_loader: replace debug to EFI_PRINT
  efi_loader: image_loader: add a check against certificate type of
    authenticode
  efi_loader: image_loader: retrieve authenticode only if it exists
  efi_loader: signature: fix a size check against revocation list
  efi_loader: signature: make efi_hash_regions more generic
  efi_loader: image_loader: verification for all signatures should pass
  efi_loader: image_loader: add digest-based verification for signed
    image
  test/py: efi_secboot: remove all "re.search"
  test/py: efi_secboot: fix test case 1g of test_authvar
  test/py: efi_secboot: split "signed image" test case-1 into two cases
  test/py: efi_secboot: add a test against certificate revocation
  test/py: efi_secboot: add a test for multiple signatures
  test/py: efi_secboot: add a test for verifying with digest of signed
    image

 include/efi_loader.h                          |  15 +-
 lib/efi_loader/efi_image_loader.c             | 210 ++++---
 lib/efi_loader/efi_setup.c                    |   7 +-
 lib/efi_loader/efi_signature.c                | 512 +++++++++---------
 lib/efi_loader/efi_variable.c                 |  27 +-
 test/py/tests/test_efi_secboot/conftest.py    |  24 +-
 .../py/tests/test_efi_secboot/test_authvar.py |  91 ++--
 test/py/tests/test_efi_secboot/test_signed.py | 212 ++++++--
 .../tests/test_efi_secboot/test_unsigned.py   |  38 +-
 9 files changed, 696 insertions(+), 440 deletions(-)

-- 
2.27.0

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2020-07-08  1:30 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-09  5:09 [PATCH v2 00/17] efi_loader: rework/improve UEFI secure boot code AKASHI Takahiro
2020-06-09  5:09 ` [PATCH v2 01/17] efi_loader: change efi objects initialization order AKASHI Takahiro
2020-07-03 10:29   ` Heinrich Schuchardt
2020-06-09  5:09 ` [PATCH v2 02/17] Revert "test: stabilize test_efi_secboot" AKASHI Takahiro
2020-07-03 10:30   ` Heinrich Schuchardt
2020-06-09  5:09 ` [PATCH v2 03/17] efi_loader: signature: replace debug to EFI_PRINT AKASHI Takahiro
2020-07-03 10:30   ` Heinrich Schuchardt
2020-06-09  5:09 ` [PATCH v2 04/17] efi_loader: variable: " AKASHI Takahiro
2020-06-09  5:09 ` [PATCH v2 05/17] efi_loader: image_loader: " AKASHI Takahiro
2020-07-03 10:38   ` Heinrich Schuchardt
2020-06-09  5:09 ` [PATCH v2 06/17] efi_loader: image_loader: add a check against certificate type of authenticode AKASHI Takahiro
2020-07-03 10:56   ` Heinrich Schuchardt
2020-07-08  1:08     ` AKASHI Takahiro
2020-06-09  5:09 ` [PATCH v2 07/17] efi_loader: image_loader: retrieve authenticode only if it exists AKASHI Takahiro
2020-06-09  5:09 ` [PATCH v2 08/17] efi_loader: signature: fix a size check against revocation list AKASHI Takahiro
2020-07-03 11:00   ` Heinrich Schuchardt
2020-07-08  1:12     ` AKASHI Takahiro
2020-07-08  1:30       ` AKASHI Takahiro
2020-06-09  5:09 ` [PATCH v2 09/17] efi_loader: signature: make efi_hash_regions more generic AKASHI Takahiro
2020-07-03 11:08   ` Heinrich Schuchardt
2020-07-08  1:22     ` AKASHI Takahiro
2020-06-09  5:09 ` [PATCH v2 10/17] efi_loader: image_loader: verification for all signatures should pass AKASHI Takahiro
2020-06-09  7:14   ` Heinrich Schuchardt
2020-06-09  5:09 ` [PATCH v2 11/17] efi_loader: image_loader: add digest-based verification for signed image AKASHI Takahiro
2020-06-09  5:09 ` [PATCH v2 12/17] test/py: efi_secboot: remove all "re.search" AKASHI Takahiro
2020-07-03 15:52   ` Heinrich Schuchardt
2020-06-09  5:09 ` [PATCH v2 13/17] test/py: efi_secboot: fix test case 1g of test_authvar AKASHI Takahiro
2020-07-03 16:08   ` Heinrich Schuchardt
2020-06-09  5:09 ` [PATCH v2 14/17] test/py: efi_secboot: split "signed image" test case-1 into two cases AKASHI Takahiro
2020-07-03 16:14   ` Heinrich Schuchardt
2020-06-09  5:09 ` [PATCH v2 15/17] test/py: efi_secboot: add a test against certificate revocation AKASHI Takahiro
2020-06-09  5:09 ` [PATCH v2 16/17] test/py: efi_secboot: add a test for multiple signatures AKASHI Takahiro
2020-06-09  5:09 ` [PATCH v2 17/17] test/py: efi_secboot: add a test for verifying with digest of signed image AKASHI Takahiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox