Changeset 108794 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/AmdSev/BlobVerifierLibSevHashes/BlobVerifierSevHashes.c
- Timestamp:
- Mar 31, 2025 11:31:09 AM (2 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168237
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-164365 /vendor/edk2/current 103735-103757,103769-103776,129194-168232
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/AmdSev/BlobVerifierLibSevHashes/BlobVerifierSevHashes.c
r101291 r108794 78 78 Verify blob from an external source. 79 79 80 If a non-secure configuration is detected this function will enter a 81 dead loop to prevent a boot. 82 80 83 @param[in] BlobName The name of the blob 81 84 @param[in] Buf The data of the blob 82 85 @param[in] BufSize The size of the blob in bytes 83 84 @retval EFI_SUCCESS The blob was verified successfully. 85 @retval EFI_ACCESS_DENIED The blob could not be verified, and therefore 86 should be considered non-secure. 86 @param[in] FetchStatus The status of the previous blob fetch 87 88 @retval EFI_SUCCESS The blob was verified successfully or was not 89 found in the hash table. 90 @retval EFI_ACCESS_DENIED Kernel hashes not supported, but the boot 91 can continue safely. 87 92 **/ 88 93 EFI_STATUS … … 91 96 IN CONST CHAR16 *BlobName, 92 97 IN CONST VOID *Buf, 93 IN UINT32 BufSize 98 IN UINT32 BufSize, 99 IN EFI_STATUS FetchStatus 94 100 ) 95 101 { … … 98 104 HASH_TABLE *Entry; 99 105 106 // Enter a dead loop if the fetching of this blob 107 // failed. This prevents a malicious host from 108 // circumventing the following checks. 109 if (EFI_ERROR (FetchStatus)) { 110 DEBUG (( 111 DEBUG_ERROR, 112 "%a: Fetching blob failed.\n", 113 __func__ 114 )); 115 116 CpuDeadLoop (); 117 } 118 100 119 if ((mHashesTable == NULL) || (mHashesTableSize == 0)) { 101 120 DEBUG (( 102 DEBUG_ ERROR,121 DEBUG_WARN, 103 122 "%a: Verifier called but no hashes table discoverd in MEMFD\n", 104 123 __func__ … … 115 134 BlobName 116 135 )); 117 return EFI_ACCESS_DENIED; 136 137 CpuDeadLoop (); 118 138 } 119 139 … … 140 160 if (EntrySize != SHA256_DIGEST_SIZE) { 141 161 DEBUG (( 142 DEBUG_ ERROR,162 DEBUG_WARN, 143 163 "%a: Hash has the wrong size %d != %d\n", 144 164 __func__, … … 171 191 BlobName 172 192 )); 193 194 CpuDeadLoop (); 173 195 } 174 196 … … 176 198 } 177 199 200 // 201 // If the GUID is not in the hash table, execution can still continue. 202 // This blob will not be measured, but at least one blob must be. 203 // 178 204 DEBUG (( 179 205 DEBUG_ERROR, … … 182 208 Guid 183 209 )); 184 return EFI_ ACCESS_DENIED;210 return EFI_SUCCESS; 185 211 } 186 212
Note:
See TracChangeset
for help on using the changeset viewer.