We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1afa77 commit 2df1b2cCopy full SHA for 2df1b2c
CryptoPkg/Library/BaseCryptLibMbedTls/Pk/CryptAuthenticode.c
@@ -72,6 +72,10 @@ AuthenticodeVerify (
72
return FALSE;
73
}
74
75
+ if (DataSize <= HashSize) {
76
+ return FALSE;
77
+ }
78
+
79
Ptr = (UINT8 *)(UINTN)AuthData;
80
Len = (UINT32)DataSize;
81
End = Ptr + Len;
@@ -188,6 +192,10 @@ AuthenticodeVerify (
188
192
// defined in Authenticode
189
193
// NOTE: Need to double-check HashLength here!
190
194
//
195
+ if (ContentSize < HashSize) {
196
197
198
191
199
if (CompareMem (SpcIndirectDataContent + ContentSize - HashSize, ImageHash, HashSize) != 0) {
200
201
// Un-matched PE/COFF Hash Value
0 commit comments