File shim-bsc1177789-fix-null-pointer-deref-AuthenticodeVerify.patch of Package shim
xxxxxxxxxx
1
From 928984f771e27d0a64def166bbc5137ce1859fe8 Mon Sep 17 00:00:00 2001
2
From: Gary Lin <glin@suse.com>
3
Date: Fri, 16 Oct 2020 15:24:44 +0800
4
Subject: [PATCH] Cryptlib/CryptAuthenticode: fix NULL pointer dereference in
5
AuthenticodeVerify()
6
7
Merge the fix from edk2 upstream:
8
https://bugzilla.tianocore.org/show_bug.cgi?id=1914
9
https://edk2.groups.io/g/devel/message/66309
10
11
Signed-off-by: Gary Lin <glin@suse.com>
12
---
13
Cryptlib/Pk/CryptAuthenticode.c | 2 +-
14
1 file changed, 1 insertion(+), 1 deletion(-)
15
16
diff --git a/Cryptlib/Pk/CryptAuthenticode.c b/Cryptlib/Pk/CryptAuthenticode.c
17
index 74e50a2..faa1efd 100644
18
--- a/Cryptlib/Pk/CryptAuthenticode.c
19
+++ b/Cryptlib/Pk/CryptAuthenticode.c
20
21
//
22
// Check if it's PKCS#7 Signed Data (for Authenticode Scenario)
23
//
24
- if (!PKCS7_type_is_signed (Pkcs7)) {
25
+ if (!PKCS7_type_is_signed (Pkcs7) || PKCS7_get_detached (Pkcs7)) {
26
goto _Exit;
27
}
28
29
--
30
2.28.0
31
32