diff options
| author | Hai Huang <huang195@gmail.com> | 2020-11-10 10:23:57 -0500 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2021-02-19 11:11:31 -0500 |
| commit | e3325f8100f5a14e0684ff80290e53975de1a5d9 (patch) | |
| tree | 54cadd8a04631de7b69c7a4070883df16913aadf | |
| parent | e5f7b252d87b9dce7d4685594b7d7a6c6421e11f (diff) | |
| download | efi-boot-shim-e3325f8100f5a14e0684ff80290e53975de1a5d9.tar.gz efi-boot-shim-e3325f8100f5a14e0684ff80290e53975de1a5d9.zip | |
Fix EV_EFI_VARIABLE_AUTHORITY event in eventlog
Currently, for an EV_EFI_VARIABLE_AUTHORITY event, the shim puts only
EFI_SIGNATURE_DATA.SignatureData in the VariableData field, but omits
EFI_SIGNATURE_DATA.SignatureOwner. According to reference implementation
in EDK2, the entire EFI_SIGNATURE_DATA is put into the VariableData
field, shown here:
https://github.com/tianocore/edk2/blob/master/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c#L1032
| -rw-r--r-- | shim.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -184,7 +184,7 @@ static CHECK_STATUS check_db_cert_in_ram(EFI_SIGNATURE_LIST *CertList, hash, SHA256_DIGEST_SIZE); if (IsFound) { dprint(L"AuthenticodeVerify() succeeded: %d\n", IsFound); - tpm_measure_variable(dbname, guid, CertSize, Cert->SignatureData); + tpm_measure_variable(dbname, guid, CertList->SignatureSize, Cert); drain_openssl_errors(); return DATA_FOUND; } else { @@ -249,7 +249,7 @@ static CHECK_STATUS check_db_hash_in_ram(EFI_SIGNATURE_LIST *CertList, // Find the signature in database. // IsFound = TRUE; - tpm_measure_variable(dbname, guid, SignatureSize, data); + tpm_measure_variable(dbname, guid, CertList->SignatureSize, Cert); break; } |
