Accepting request 1233794 from Base:System
OBS-URL: https://build.opensuse.org/request/show/1233794 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pcr-oracle?expand=0&rev=15
This commit is contained in:
commit
a18732fa3e
35
fix-event-reshash-for-cryptouuid.patch
Normal file
35
fix-event-reshash-for-cryptouuid.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From bfd8520b4af3743a51046c83a1382fe1e66cc95a Mon Sep 17 00:00:00 2001
|
||||
From: Gary Lin <glin@suse.com>
|
||||
Date: Thu, 26 Dec 2024 13:46:45 +0800
|
||||
Subject: [PATCH] Fix event rehash for grub files on system partition
|
||||
|
||||
The crypto device logged by grub may not be 'crypto0'. It could begin
|
||||
with the 'cryptouuid' prefix like this:
|
||||
|
||||
cryptouuid/4203418d2b034db5b9476f013ee3dc80
|
||||
|
||||
This commit adds the additional prefix matching for 'cryptouuid' to make
|
||||
pcr-oracle to search the file on system partition.
|
||||
|
||||
Signed-off-by: Gary Lin <glin@suse.com>
|
||||
---
|
||||
src/eventlog.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/eventlog.c b/src/eventlog.c
|
||||
index 4277d42..c49599d 100644
|
||||
--- a/src/eventlog.c
|
||||
+++ b/src/eventlog.c
|
||||
@@ -578,7 +578,8 @@ __tpm_event_grub_file_rehash(const tpm_event_t *ev, const tpm_parsed_event_t *pa
|
||||
const tpm_evdigest_t *md = NULL;
|
||||
|
||||
debug(" re-hashing %s\n", __tpm_event_grub_file_describe(parsed));
|
||||
- if (evspec->device == NULL || !strcmp(evspec->device, "crypto0")) {
|
||||
+ if (evspec->device == NULL || !strcmp(evspec->device, "crypto0") ||
|
||||
+ !strncmp(evspec->device, "cryptouuid", strlen("cryptouuid"))) {
|
||||
debug(" assuming the file resides on system partition\n");
|
||||
md = runtime_digest_rootfs_file(ctx->algo, evspec->path);
|
||||
} else {
|
||||
--
|
||||
2.43.0
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 26 05:57:07 UTC 2024 - Gary Ching-Pang Lin <glin@suse.com>
|
||||
|
||||
- Add fix-event-reshash-for-cryptouuid.patch to detect the crypto
|
||||
device with the 'cryptouuid' prefix
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 5 06:11:52 UTC 2024 - Gary Ching-Pang Lin <glin@suse.com>
|
||||
|
||||
|
@ -38,6 +38,8 @@ Patch3: fix_grub_bls_cmdline.patch
|
||||
Patch4: support-ecc-srk.patch
|
||||
# PATCH-FIX-UPSTREAM fix-testcase-empty-efi-variables.patch gh#okirch/pcr-oracle!58
|
||||
Patch5: fix-testcase-empty-efi-variables.patch
|
||||
# PATCH-FIX-UPSTREAM fix-event-reshash-for-cryptouuid.patch gh#okirch/pcr-oracle!60
|
||||
Patch6: fix-event-reshash-for-cryptouuid.patch
|
||||
BuildRequires: libopenssl-devel >= 0.9.8
|
||||
BuildRequires: tpm2-0-tss-devel >= 2.4.0
|
||||
Requires: libtss2-tcti-device0
|
||||
|
Loading…
Reference in New Issue
Block a user