-
Notifications
You must be signed in to change notification settings - Fork 28
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
Eventlog mutability attack #139
Comments
I think this means that we can't have any ignored entries in the log at all; the verifier must have every operation (type and digest) on its allowed-list. This potentially causes a problem for something like |
How does this work without having a collision attack on the digest? EDIT: Ah, this is a possible bug in PCR/eventlog validators, where they compute the hash extension using all the eventlog entries, but don't check the validity of any individual extensions marked |
Exactly -- the issue is that the validator parsing the eventlog to determine which kernel was loaded. By replacing all of the real boot time event types with ignored events, the attacker with code execution on the system can craft an eventlog and PCR values that match whatever they want. Using a zero-valued PCR as a "policy cap" to prevent secrets from being unsealed prevents this from working if the attacker gets code execution later on a normal boot after the cap PCR has been extended, although an attacker who can control the system prior to attestation could still bypass this. I think the |
Right, so, one fix is that The real fix is to the validators, naturally. They MUST NOT ignore ignore entries. Besides fixing the validators, we could have a specialty validator whose job is to fail if there are entries of unknown types. We still need the types to be accurate though. |
Ultimately it seems like the problem is in the PC platform spec: the eventlog entry types should be part of what gets extended into the relevant PCRs. |
Currently we use only the |
There is potentially an attack against eventlogs that takes advantage of the fact that only the
PCRIndex
andDigest
are protected by the signature on the TPM quote, theEventType
is not included: https://github.com/google/go-attestation/blob/master/docs/event-log-disclosure.mdAfter gaining code execution, an adversary could modify the eventlog
EventType
for all of the earlier events to beEV_UNUSED
or some other type that might be ignored by the eventlog parser in the attestation server, and then add new events of the correct type, but with their own digests, to both the log and to the real PCRs. When the attacker generates a quote, the PCRs and the eventlog will be consistent, and the attestation server might be tricked into thinking a differentPK
orSecureBoot
setup is included in the quote.We verify that the eventlog and PCR in the quote are consistent and valid; we should also be sure that we throw an attestation verification error if there are unexpected event types or if the event types do not match.
The text was updated successfully, but these errors were encountered: