pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/openssl openssl: Update to 1.1.1l.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/292847616d8f
branches:  trunk
changeset: 457434:292847616d8f
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Wed Aug 25 11:25:25 2021 +0000

description:
openssl: Update to 1.1.1l.

Changes between 1.1.1k and 1.1.1l [24 Aug 2021]

*) Fixed an SM2 Decryption Buffer Overflow.

   In order to decrypt SM2 encrypted data an application is expected to call the
   API function EVP_PKEY_decrypt(). Typically an application will call this
   function twice. The first time, on entry, the "out" parameter can be NULL and,
   on exit, the "outlen" parameter is populated with the buffer size required to
   hold the decrypted plaintext. The application can then allocate a sufficiently
   sized buffer and call EVP_PKEY_decrypt() again, but this time passing a non-NULL
   value for the "out" parameter.

   A bug in the implementation of the SM2 decryption code means that the
   calculation of the buffer size required to hold the plaintext returned by the
   first call to EVP_PKEY_decrypt() can be smaller than the actual size required by
   the second call. This can lead to a buffer overflow when EVP_PKEY_decrypt() is
   called by the application a second time with a buffer that is too small.

   A malicious attacker who is able present SM2 content for decryption to an
   application could cause attacker chosen data to overflow the buffer by up to a
   maximum of 62 bytes altering the contents of other data held after the
   buffer, possibly changing application behaviour or causing the application to
   crash. The location of the buffer is application dependent but is typically
   heap allocated.
   (CVE-2021-3711)
   [Matt Caswell]

*) Fixed various read buffer overruns processing ASN.1 strings

   ASN.1 strings are represented internally within OpenSSL as an ASN1_STRING
   structure which contains a buffer holding the string data and a field holding
   the buffer length. This contrasts with normal C strings which are repesented as
   a buffer for the string data which is terminated with a NUL (0) byte.

   Although not a strict requirement, ASN.1 strings that are parsed using OpenSSL's
   own "d2i" functions (and other similar parsing functions) as well as any string
   whose value has been set with the ASN1_STRING_set() function will additionally
   NUL terminate the byte array in the ASN1_STRING structure.

   However, it is possible for applications to directly construct valid ASN1_STRING
   structures which do not NUL terminate the byte array by directly setting the
   "data" and "length" fields in the ASN1_STRING array. This can also happen by
   using the ASN1_STRING_set0() function.

   Numerous OpenSSL functions that print ASN.1 data have been found to assume that
   the ASN1_STRING byte array will be NUL terminated, even though this is not
   guaranteed for strings that have been directly constructed. Where an application
   requests an ASN.1 structure to be printed, and where that ASN.1 structure
   contains ASN1_STRINGs that have been directly constructed by the application
   without NUL terminating the "data" field, then a read buffer overrun can occur.

   The same thing can also occur during name constraints processing of certificates
   (for example if a certificate has been directly constructed by the application
   instead of loading it via the OpenSSL parsing functions, and the certificate
   contains non NUL terminated ASN1_STRING structures). It can also occur in the
   X509_get1_email(), X509_REQ_get1_email() and X509_get1_ocsp() functions.

   If a malicious actor can cause an application to directly construct an
   ASN1_STRING and then process it through one of the affected OpenSSL functions
   then this issue could be hit. This might result in a crash (causing a Denial of
   Service attack). It could also result in the disclosure of private memory
   contents (such as private keys, or sensitive plaintext).
   (CVE-2021-3712)
   [Matt Caswell]

diffstat:

 security/openssl/Makefile                               |   7 ++---
 security/openssl/PLIST                                  |   3 +-
 security/openssl/builtin.mk                             |   6 ++--
 security/openssl/distinfo                               |  11 ++++-----
 security/openssl/patches/patch-include_openssl_e__os2.h |  19 -----------------
 5 files changed, 13 insertions(+), 33 deletions(-)

diffs (103 lines):

diff -r b97c4b9ed3f3 -r 292847616d8f security/openssl/Makefile
--- a/security/openssl/Makefile Wed Aug 25 11:06:28 2021 +0000
+++ b/security/openssl/Makefile Wed Aug 25 11:25:25 2021 +0000
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.274 2021/07/18 23:11:08 dholland Exp $
+# $NetBSD: Makefile,v 1.275 2021/08/25 11:25:25 jperkin Exp $
 
-# Remember to upload-distfiles when updating OpenSSL -- otherwise it 
+# Remember to upload-distfiles when updating OpenSSL -- otherwise it
 # is not possible for users who have bootstrapped without OpenSSL
 # to install it and enable HTTPS fetching.
-DISTNAME=      openssl-1.1.1k
-PKGREVISION=   1
+DISTNAME=      openssl-1.1.1l
 CATEGORIES=    security
 MASTER_SITES=  https://www.openssl.org/source/
 
diff -r b97c4b9ed3f3 -r 292847616d8f security/openssl/PLIST
--- a/security/openssl/PLIST    Wed Aug 25 11:06:28 2021 +0000
+++ b/security/openssl/PLIST    Wed Aug 25 11:25:25 2021 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.8 2021/02/20 08:53:23 wiz Exp $
+@comment $NetBSD: PLIST,v 1.9 2021/08/25 11:25:25 jperkin Exp $
 bin/c_rehash
 bin/openssl
 include/openssl/aes.h
@@ -533,6 +533,7 @@
 man/man3/BN_RECP_CTX_free.3
 man/man3/BN_RECP_CTX_new.3
 man/man3/BN_RECP_CTX_set.3
+man/man3/BN_abs_is_word.3
 man/man3/BN_add.3
 man/man3/BN_add_word.3
 man/man3/BN_bin2bn.3
diff -r b97c4b9ed3f3 -r 292847616d8f security/openssl/builtin.mk
--- a/security/openssl/builtin.mk       Wed Aug 25 11:06:28 2021 +0000
+++ b/security/openssl/builtin.mk       Wed Aug 25 11:25:25 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.47 2021/03/01 23:28:54 gdt Exp $
+# $NetBSD: builtin.mk,v 1.48 2021/08/25 11:25:25 jperkin Exp $
 
 BUILTIN_PKG:=  openssl
 
@@ -142,7 +142,7 @@
 .      if exists(/etc/pki/tls)
 # Some distributions have moved to /etc/pki/tls, with incomplete
 # symlinks from /etc/ssl.  Prefer the new location if it exists
-SSLDIR=        /etc/pki/tls 
+SSLDIR=        /etc/pki/tls
 .      else
 SSLDIR=        /etc/ssl                # standard location
 .      endif
@@ -165,7 +165,7 @@
 # directory that has one file per cert, or the directory that contains
 # trust anchor config in some fortm.
 .  if exists(${SSLDIR}/certs/ca-bundle.crt)
-SSLCERTBUNDLE=  ${SSLDIR}/certs/ca-bundle.crt
+SSLCERTBUNDLE= ${SSLDIR}/certs/ca-bundle.crt
 .  endif
 SSLKEYS=       ${SSLDIR}/private
 
diff -r b97c4b9ed3f3 -r 292847616d8f security/openssl/distinfo
--- a/security/openssl/distinfo Wed Aug 25 11:06:28 2021 +0000
+++ b/security/openssl/distinfo Wed Aug 25 11:25:25 2021 +0000
@@ -1,10 +1,9 @@
-$NetBSD: distinfo,v 1.150 2021/04/22 09:32:39 nros Exp $
+$NetBSD: distinfo,v 1.151 2021/08/25 11:25:25 jperkin Exp $
 
-SHA1 (openssl-1.1.1k.tar.gz) = bad9dc4ae6dcc1855085463099b5dacb0ec6130b
-RMD160 (openssl-1.1.1k.tar.gz) = 5c9fbbeae7d115e59be705162e58195517a37cae
-SHA512 (openssl-1.1.1k.tar.gz) = 73cd042d4056585e5a9dd7ab68e7c7310a3a4c783eafa07ab0b560e7462b924e4376436a6d38a155c687f6942a881cfc0c1b9394afcde1d8c46bf396e7d51121
-Size (openssl-1.1.1k.tar.gz) = 9823400 bytes
+SHA1 (openssl-1.1.1l.tar.gz) = f8819dd31642eebea6cc1fa5c256fc9a4f40809b
+RMD160 (openssl-1.1.1l.tar.gz) = aa470eea95b127e7ea389c39610a7568579d6b86
+SHA512 (openssl-1.1.1l.tar.gz) = d9611f393e37577cca05004531388d3e0ebbf714894cab9f95f4903909cd4f45c214faab664c0cbc3ad3cca309d500b9e6d0ecbf9a0a0588d1677dc6b047f9e0
+Size (openssl-1.1.1l.tar.gz) = 9834044 bytes
 SHA1 (patch-Configurations_shared-info.pl) = 0e835f6e343b5d05ef9a0e6ef2a195201262d15c
 SHA1 (patch-Configurations_unix-Makefile.tmpl) = cf6b46c6e10e84100beb468bbe6f85c5e62cbe7a
 SHA1 (patch-Configure) = 479f1bc826f7721f6b44d6b5a6cf460432924bf2
-SHA1 (patch-include_openssl_e__os2.h) = d2f08d50fe44da37c6399665c09abe0e1f06429b
diff -r b97c4b9ed3f3 -r 292847616d8f security/openssl/patches/patch-include_openssl_e__os2.h
--- a/security/openssl/patches/patch-include_openssl_e__os2.h   Wed Aug 25 11:06:28 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-$NetBSD: patch-include_openssl_e__os2.h,v 1.1 2021/04/22 09:32:40 nros Exp $
-
-* gcc on Solaris/lllumos defines __STDC_VERSION__ in c++ mode where _Noreturn
-  does not exist, this breaks c++17 builds that use openssl.
-
-  filed upstream: https://github.com/openssl/openssl/pull/14944
-
---- include/openssl/e_os2.h.orig       2021-04-22 08:37:49.922502161 +0000
-+++ include/openssl/e_os2.h
-@@ -279,7 +279,8 @@ typedef unsigned __int64 uint64_t;
- #  define ossl_inline inline
- # endif
- 
--# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
-+# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && \
-+     !defined(__cplusplus)
- #  define ossl_noreturn _Noreturn
- # elif defined(__GNUC__) && __GNUC__ >= 2
- #  define ossl_noreturn __attribute__((noreturn))



Home | Main Index | Thread Index | Old Index