summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssl/openssl-1.0.1e/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
diff options
context:
space:
mode:
authorXufeng Zhang <xufeng.zhang@windriver.com>2013-08-22 11:12:28 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-26 11:47:17 +0100
commitc82255d90b2d26c8affcbb81bfa4793033610de1 (patch)
tree52a20d31943f4cb7bb08389a4d98b276fd1bfc41 /meta/recipes-connectivity/openssl/openssl-1.0.1e/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
parentb9f0fc6e983f492533fd9321183666d61f474a58 (diff)
downloadpoky-c82255d90b2d26c8affcbb81bfa4793033610de1.tar.gz
openssl: avoid NULL pointer dereference in three places
There are three potential NULL pointer dereference in EVP_DigestInit_ex(), dh_pub_encode() and dsa_pub_encode() functions. Fix them by adding proper null pointer check. [YOCTO #4600] [ CQID: WIND00373257 ] (From OE-Core rev: 4779d3c89cf0129763a4f5b7306c1247a0d6d021) Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl-1.0.1e/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch')
-rw-r--r--meta/recipes-connectivity/openssl/openssl-1.0.1e/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl-1.0.1e/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch b/meta/recipes-connectivity/openssl/openssl-1.0.1e/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
new file mode 100644
index 0000000000..c161e62f62
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl-1.0.1e/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
@@ -0,0 +1,21 @@
1openssl: avoid NULL pointer dereference in EVP_DigestInit_ex()
2
3We should avoid accessing the type pointer if it's NULL,
4this could happen if ctx->digest is not NULL.
5
6Upstream-Status: Submitted
7http://www.mail-archive.com/openssl-dev@openssl.org/msg32860.html
8
9Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
10---
11--- a/crypto/evp/digest.c
12+++ b/crypto/evp/digest.c
13@@ -199,7 +199,7 @@
14 return 0;
15 }
16 #endif
17- if (ctx->digest != type)
18+ if (type && (ctx->digest != type))
19 {
20 if (ctx->digest && ctx->digest->ctx_size)
21 OPENSSL_free(ctx->md_data);