Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

u-root tpm2 PCR measurements are not robust to TPM Carte Blanche #2721

Open
chrisfenner opened this issue Jul 17, 2023 · 0 comments
Open

u-root tpm2 PCR measurements are not robust to TPM Carte Blanche #2721

chrisfenner opened this issue Jul 17, 2023 · 0 comments
Labels
Bug Stuff that's wrong

Comments

@chrisfenner
Copy link
Member

chrisfenner commented Jul 17, 2023

Describe the bug

I noticed pkg/tss only interacts with the SHA256 PCRs, and assumes that hashes being passed to the library are SHA256 hashes. Couple problems:

  1. This code might run on a system whose TPM has a different PCR bank enabled instead (like SHA1 or SHA384)
  2. This code might run on a system that has both SHA256 and another PCR algorithm enabled. This means that u-root will leave that other PCR bank totally empty and free for falsified attestations by later code.

A long-winded explanation of "TPM Carte Blanche" is available at https://www.dlp.rip/tpm-carte-blanche.

To Reproduce
n/a (issue reported based on inspection of the code)

Expected behavior

  • u-root extends all PCR banks
  • u-root doesn't assume every digest is a SHA256 digest

Additional context
https://www.dlp.rip/tpm-carte-blanche

@chrisfenner chrisfenner added the Bug Stuff that's wrong label Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Stuff that's wrong
Projects
None yet
Development

No branches or pull requests

1 participant