diff options
| author | tedu <> | 2015-03-19 14:00:22 +0000 |
|---|---|---|
| committer | tedu <> | 2015-03-19 14:00:22 +0000 |
| commit | 985dda77b7930c0837c4acb74b7bd23252f849c1 (patch) | |
| tree | e1849327a9d18d917e7698c775d31f7ae7c4e34f /src/lib/libcrypto/pkcs7/pk7_lib.c | |
| parent | 6b3d8d3164d1b68d078a0cf83583f3dd8bbcb340 (diff) | |
| download | openbsd-985dda77b7930c0837c4acb74b7bd23252f849c1.tar.gz openbsd-985dda77b7930c0837c4acb74b7bd23252f849c1.tar.bz2 openbsd-985dda77b7930c0837c4acb74b7bd23252f849c1.zip | |
Fix several crash causing defects from OpenSSL.
These include:
CVE-2015-0209 - Use After Free following d2i_ECPrivatekey error
CVE-2015-0286 - Segmentation fault in ASN1_TYPE_cmp
CVE-2015-0287 - ASN.1 structure reuse memory corruption
CVE-2015-0289 - PKCS7 NULL pointer dereferences
Several other issues did not apply or were already fixed.
Refer to https://www.openssl.org/news/secadv_20150319.txt
joint work with beck, doug, guenther, jsing, miod
Diffstat (limited to 'src/lib/libcrypto/pkcs7/pk7_lib.c')
| -rw-r--r-- | src/lib/libcrypto/pkcs7/pk7_lib.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/pkcs7/pk7_lib.c b/src/lib/libcrypto/pkcs7/pk7_lib.c index 27370800c9..3eec92e29b 100644 --- a/src/lib/libcrypto/pkcs7/pk7_lib.c +++ b/src/lib/libcrypto/pkcs7/pk7_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: pk7_lib.c,v 1.14 2014/07/12 16:03:37 miod Exp $ */ | 1 | /* $OpenBSD: pk7_lib.c,v 1.15 2015/03/19 14:00:22 tedu Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -460,6 +460,8 @@ PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md) | |||
| 460 | STACK_OF(PKCS7_SIGNER_INFO) * | 460 | STACK_OF(PKCS7_SIGNER_INFO) * |
| 461 | PKCS7_get_signer_info(PKCS7 *p7) | 461 | PKCS7_get_signer_info(PKCS7 *p7) |
| 462 | { | 462 | { |
| 463 | if (p7 == NULL || p7->d.ptr == NULL) | ||
| 464 | return (NULL); | ||
| 463 | if (PKCS7_type_is_signed(p7)) { | 465 | if (PKCS7_type_is_signed(p7)) { |
| 464 | return (p7->d.sign->signer_info); | 466 | return (p7->d.sign->signer_info); |
| 465 | } else if (PKCS7_type_is_signedAndEnveloped(p7)) { | 467 | } else if (PKCS7_type_is_signedAndEnveloped(p7)) { |
