[systemd-devel] Trying to understand change in PCR 4 extension behavior
Kyle Rose
krose at krose.org
Wed Dec 14 17:28:20 UTC 2022
I've been developing and using my own measured boot solution for a few
years now, based on the EFI stub provided by systemd. Sometime between
v247 and v252, the behavior changed in a way that I have not been able
to track down to a specific change, partly because I haven't been able
to pinpoint where the new measurement has been implemented.
In v247, the boot log ends by extending PCR 4 with a single very
simple BSA event:
- EventNum: 25
PCRIndex: 4
EventType: EV_EFI_BOOT_SERVICES_APPLICATION
DigestCount: 2
Digests:
- AlgorithmId: sha1
Digest: "9b87079d73e8e2135b43fb41545c5a1917672a50"
- AlgorithmId: sha256
Digest: "61f58b66936e962f1872c2b2618c4578d905a60cabcadfe1e707a7bb1bbf862c"
EventSize: 168
Event:
ImageLocationInMemory: 0x82c78018
ImageLengthInMemory: 73463647
ImageLinkTimeAddress: 0x0
LengthOfDevicePath: 136
DevicePath:
'02010c00d041030a0000000001010600001d01010600000003171000010000000025385191b2d71d04012a00010000000008000000000000002811000000000025707467aecfea11850ecdf2cff0384c0202040432005c004500460049005c00440045004200490041004e005c0045004d0042004f004f0054002e0045004600490000007fff0400'
However, in v252, the corresponding event occurs earlier in the log
and (after some measurements extending PCR 11) is followed by another
BSA event extending PCR 4 with a DevicePath I can't parse from a call
I can't seem to find in the systemd source code:
- EventNum: 34
PCRIndex: 4
EventType: EV_EFI_BOOT_SERVICES_APPLICATION
DigestCount: 2
Digests:
- AlgorithmId: sha1
Digest: "9a3c68bb105e4c4e70cbc3375bd45d616e220586"
- AlgorithmId: sha256
Digest: "36e49f2a0c246db5836b85319e7b2ae04690aca40227895902870a54a054c78b"
EventSize: 56
Event:
ImageLocationInMemory: 0xb7c36000
ImageLengthInMemory: 7793888
ImageLinkTimeAddress: 0x1000000
LengthOfDevicePath: 24
DevicePath: '04031400f8d1c555cd04b5468a20e56cbb3052d07fff0400'
Can someone help me decode this so I can figure out where this event
originates, or (if this event is well-known to the folks working on
the trusted computing portion of systemd) tell me where this extension
is triggered in the source code? That will at least help me find and
hopefully understand the relevant change.
Thanks,
Kyle
More information about the systemd-devel
mailing list