efi/preinstall: Check that TPM's platform hierarchy is disabled or has an authorization value
- Dominant language
- Go
- Stars
- 23
- Forks
- 29
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 2
Description
The TPM's platform hierarchy is under the control of the platform firmware. Before executing any third-party code, the platform firmware should prevent use of the platform hierarchy by the OS, by doing one of the following:
- Set the authorization value for the platform hierarchy to a random value with `TPM2_HierarchyChangeAuth`
- Disable the platform hierarchy with `TPM2_HierarchyControl`
These are both reset on the next TPM restart or reset.
The pre-install checks should test for this and return an appropriate error if the platform firmware is not behaving as expected.
Contributor guide
Research direction
Locate the pre-install checks and the existing TPM handling in this Go repository. Read how TPM hierarchy state and errors are currently represented, then verify the platform hierarchy's authorization or disabled state using the specified TPM2_HierarchyChangeAuth and TPM2_HierarchyControl behavior. Done means an appropriate error is returned when neither expected condition is met.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- operating-systems, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100