[PATCH 0/1] Fix handling for PCR4/EV_EFI_BOOT_SERVICES_APPLICATION
Mario Limonciello
mario.limonciello at amd.com
Fri Sep 15 04:20:34 UTC 2023
When the Linux kernel is booted from shim, there are 3 PCR4/EV_EFI_BOOT_SERVICES_APPLICATION
events that occur.
These events are:
First event (shim)
PCRIndex: 0x00000004(UEFI Boot Manager Code and Boot Attempts)
EventType: 0x80000003(EV_EFI_BOOT_SERVICES_APPLICATION)
Digests Count : 0x00000001
Digests[0].AlgId: 0x000b(SHA256)
Digest:
0000: BF 6B 6D FD B1 F6 43 5A 81 E4 80 8D B7 F8 46 D8 .km...CZ......F.
0010: 6D 17 05 66 E4 75 3D 43 84 FD AB 65 04 BE 4F B9 m..f.u=C...e..O.
EventSize: 170
Event:
0000: 18 90 52 6B 00 00 00 00 D8 A7 0E 00 00 00 00 00 ..Rk............
0010: 00 00 00 00 00 00 00 00 8A 00 00 00 00 00 00 00 ................
0020: 02 01 0C 00 D0 41 03 0A 00 00 00 00 01 01 06 00 .....A..........
0030: 04 02 01 01 06 00 00 00 03 17 10 00 01 00 00 00 ................
0040: 00 25 38 BB 11 40 CA 4E 04 01 2A 00 01 00 00 00 .%8.. at .N..*.....
0050: 00 08 00 00 00 00 00 00 00 00 10 00 00 00 00 00 ................
0060: 48 6E 67 A9 55 8E AF 4B A7 F5 AD 07 41 C6 6F 5D Hng.U..K....A.o]
0070: 02 02 04 04 34 00 5C 00 45 00 46 00 49 00 5C 00 ....4.\.E.F.I.\.
0080: 75 00 62 00 75 00 6E 00 74 00 75 00 5C 00 73 00 u.b.u.n.t.u.\.s.
0090: 68 00 69 00 6D 00 78 00 36 00 34 00 2E 00 65 00 h.i.m.x.6.4...e.
00A0: 66 00 69 00 00 00 7F FF 04 00 f.i.......
Second event (GRUB)
PCRIndex: 0x00000004(UEFI Boot Manager Code and Boot Attempts)
EventType: 0x80000003(EV_EFI_BOOT_SERVICES_APPLICATION)
Digests Count : 0x00000001
Digests[0].AlgId: 0x000b(SHA256)
Digest:
0000: 1D F9 3A C5 8E D8 70 41 1F 96 04 83 81 76 62 8B ..:...pA.....vb.
0010: D0 54 87 B7 3A 5E AE 06 B0 F5 8A E7 A9 4F 90 9F .T..:^.......O..
EventSize: 88
Event:
0000: 18 40 18 5E 00 00 00 00 88 97 27 00 00 00 00 00 . at .^......'.....
0010: 00 00 00 00 00 00 00 00 38 00 00 00 00 00 00 00 ........8.......
0020: 04 04 34 00 5C 00 45 00 46 00 49 00 5C 00 75 00 ..4.\.E.F.I.\.u.
0030: 62 00 75 00 6E 00 74 00 75 00 5C 00 67 00 72 00 b.u.n.t.u.\.g.r.
0040: 75 00 62 00 78 00 36 00 34 00 2E 00 65 00 66 00 u.b.x.6.4...e.f.
0050: 69 00 00 00 7F FF 04 00 i.......
Third event (kernel)
PCRIndex: 0x00000004(UEFI Boot Manager Code and Boot Attempts)
EventType: 0x80000003(EV_EFI_BOOT_SERVICES_APPLICATION)
Digests Count : 0x00000001
Digests[0].AlgId: 0x000b(SHA256)
Digest:
0000: EC E3 99 EF 9B 99 41 60 92 03 32 6C 3B 11 AC 4F ......A`..2l;..O
0010: 24 E8 01 A9 CA B2 8B 68 B4 70 EF BE C6 C0 CD A1 $......h.p......
EventSize: 32
Event:
0000: 40 B2 AF 5A 00 00 00 00 50 7C BA 00 00 00 00 00 @..Z....P|......
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
The kernel load event trips both checks in tpmevlog_pcr_type_event_check()
so loosen the requirements for it.
Mario Limonciello (1):
tpmevlog: Correct boundary checking for PCR4 event check
src/tpm/tpmevlog/tpmevlog.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--
2.34.1
More information about the fwts-devel
mailing list