File openssl-CVE-2015-0288.patch of Package compat-openssl098.29129
commit 241cff623e2b0f7c435a3a80ae783c29d994f061
Author: Dr. Stephen Henson <steve@openssl.org>
Date: Wed Feb 18 00:34:59 2015 +0000
Check public key is not NULL.
CVE-2015-0288
PR#3708
Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 28a00bcd8e318da18031b2ac8778c64147cd54f9)
Index: openssl-0.9.8j/crypto/x509/x509_req.c
===================================================================
--- openssl-0.9.8j.orig/crypto/x509/x509_req.c 2015-03-16 18:10:22.131032871 +0100
+++ openssl-0.9.8j/crypto/x509/x509_req.c 2015-03-16 18:12:32.425911222 +0100
@@ -91,6 +91,8 @@ X509_REQ *X509_to_X509_REQ(X509 *x, EVP_
goto err;
pktmp = X509_get_pubkey(x);
+ if (pktmp == NULL)
+ goto err;
i=X509_REQ_set_pubkey(ret,pktmp);
EVP_PKEY_free(pktmp);
if (!i) goto err;