Skip to content

Comments

Extract EFIBootServicesApplication events from PCR4 and validate EFI_ACTION as described in the spec#19

Closed
yawangwang wants to merge 1 commit intogoogle:mainfrom
yawangwang:extract_EFIBootServicesApps
Closed

Extract EFIBootServicesApplication events from PCR4 and validate EFI_ACTION as described in the spec#19
yawangwang wants to merge 1 commit intogoogle:mainfrom
yawangwang:extract_EFIBootServicesApps

Conversation

@yawangwang
Copy link
Collaborator

@yawangwang yawangwang commented Apr 9, 2025

This PR does the following two things:

  1. Adds support to extract EFIBootServicesApplication from PCR4 and populate them into FirmwareLogState.
  2. Check the sequence of measuring the EFI_ACTION event “Booting to
    <Boot####> Option” in PCR4 conforming to the TCG PC Client Platform Firmware Profile Specification.
    • According to Section 8.4.2 step 4.a:
Upon selecting a boot device, the UEFI firmware measures the event type EV_EFI_ACTION “Calling EFI
Application from Boot Option” into PCR[4] and measures the event type EV_EFI_ACTION “Booting to
<Boot####> Option” where Boot#### is the Boot Option Variable Name.

@yawangwang yawangwang requested a review from alexmwu April 9, 2025 00:36
Copy link
Collaborator

@alexmwu alexmwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this PR is necessary since we're checking the "Booting" event, but that is extraneous when we have the Calling EFI App event and it is unused.

exitBootSvcDigest := hasher.Sum(nil)

var efiAppStates []*pb.EfiApp
var efiAppEvents []tcg.Event
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we returning these events?

@alexmwu
Copy link
Collaborator

alexmwu commented Apr 9, 2025

This PR does the following two things:

  1. Adds support to extract EFIBootServicesApplication from PCR4 and populate them into FirmwareLogState.

This already exists. This PR only does 2.

  1. Validate the presence of the EFI_ACTION event “Booting to
    <Boot####> Option” found in PCR4 conforming to the TCG PC Client Platform Firmware Profile Specification.

    • According to Section 8.4.2 step 4.a:
Upon selecting a boot device, the UEFI firmware measures the event type EV_EFI_ACTION “Calling EFI
Application from Boot Option” into PCR[4] and measures the event type EV_EFI_ACTION “Booting to
<Boot####> Option” where Boot#### is the Boot Option Variable Name.

I'm not sure we need to validate this action unless we plan on extracting the boot variable option. The Calling EFI App event is sufficient.

@yawangwang
Copy link
Collaborator Author

Talked offline, this PR is unnecessary for now unless we plan to extract the boot variable option. Closing it.

@yawangwang yawangwang closed this Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants