Commit graph

276 commits

Author SHA1 Message Date
adam
e11bfb6311 openssl: fix building on Darwin 2021-08-25 15:22:05 +00:00
jperkin
8ddcb85c06 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]
2021-08-25 11:25:25 +00:00
dholland
e2f8c178c8 PR 55733 Joern Clausen: use GNU m4 with security/openssl on Solaris.
Seems that Solaris's m4 overflows internal limits.
2021-07-18 23:11:08 +00:00
jperkin
171def8045 openssl: Stop passing CFLAGS/LDFLAGS to configure.
If this ever worked it only did by accident.  Specifying, for example,
"-arch arm64" as used on macOS is enough to break its custom configure
script that assumes all arguments start with "-".

The flags seem to propogate through the environment normally.
2021-07-10 15:40:52 +00:00
schmonz
0efaad1271 On Mac OS X Snow Leopard with ABI=64, configure was selecting a 32-bit
build (and then failing in the assembler). Override its choice on
Darwin/x86_64 by specifying KERNEL_BITS=${ABI} in CONFIGURE_ENV.
2021-07-09 18:22:56 +00:00
wiz
6eae1297d5 *: recursive bump for perl 5.34 2021-05-24 19:49:01 +00:00
nia
c54ea0d550 openssl: add note on updating 2021-04-22 09:59:37 +00:00
jperkin
e362a06526 openssl: Update to 1.1.1k.
Approved by @wiz during freeze.

Changes between 1.1.1j and 1.1.1k [25 Mar 2021]

 *) Fixed a problem with verifying a certificate chain when using the
    X509_V_FLAG_X509_STRICT flag. This flag enables additional security checks
    of the certificates present in a certificate chain. It is not set by
    default.

    Starting from OpenSSL version 1.1.1h a check to disallow certificates in
    the chain that have explicitly encoded elliptic curve parameters was added
    as an additional strict check.

    An error in the implementation of this check meant that the result of a
    previous check to confirm that certificates in the chain are valid CA
    certificates was overwritten. This effectively bypasses the check
    that non-CA certificates must not be able to issue other certificates.

    If a "purpose" has been configured then there is a subsequent opportunity
    for checks that the certificate is a valid CA.  All of the named "purpose"
    values implemented in libcrypto perform this check.  Therefore, where
    a purpose is set the certificate chain will still be rejected even when the
    strict flag has been used. A purpose is set by default in libssl client and
    server certificate verification routines, but it can be overridden or
    removed by an application.

    In order to be affected, an application must explicitly set the
    X509_V_FLAG_X509_STRICT verification flag and either not set a purpose
    for the certificate verification or, in the case of TLS client or server
    applications, override the default purpose.
    (CVE-2021-3450)
    [Tomáš Mráz]

 *) Fixed an issue where an OpenSSL TLS server may crash if sent a maliciously
    crafted renegotiation ClientHello message from a client. If a TLSv1.2
    renegotiation ClientHello omits the signature_algorithms extension (where
    it was present in the initial ClientHello), but includes a
    signature_algorithms_cert extension then a NULL pointer dereference will
    result, leading to a crash and a denial of service attack.

    A server is only vulnerable if it has TLSv1.2 and renegotiation enabled
    (which is the default configuration). OpenSSL TLS clients are not impacted
    by this issue.
    (CVE-2021-3449)
    [Peter Kästle and Samuel Sapalski]
2021-03-25 16:36:19 +00:00
wiz
bd905d0798 openssl: update to 1.1.1j.
Major changes between OpenSSL 1.1.1i and OpenSSL 1.1.1j [16 Feb 2021]

      o Fixed a NULL pointer deref in the X509_issuer_and_serial_hash()
        function (CVE-2021-23841)
      o Fixed the RSA_padding_check_SSLv23() function and the RSA_SSLV23_PADDING
        padding mode to correctly check for rollback attacks
      o Fixed an overflow in the EVP_CipherUpdate, EVP_EncryptUpdate and
        EVP_DecryptUpdate functions (CVE-2021-23840)
      o Fixed SRP_Calc_client_key so that it runs in constant time
2021-02-20 08:53:23 +00:00
schmonz
3dfd135e33 Fix build on OpenBSD by defining __STDC_NO_ATOMICS__. 2021-01-25 20:26:43 +00:00
wiz
174cbac92c openssl: update to 1.1.1i.
Major changes between OpenSSL 1.1.1h and OpenSSL 1.1.1i [8 Dec 2020]

      o Fixed NULL pointer deref in GENERAL_NAME_cmp (CVE-2020-1971)
2020-12-08 18:54:17 +00:00
maya
3805ac2a5a openssl: add -lrt for the benefit of Solaris 10.
PR pkg/55688
PR pkg/54958
2020-10-13 07:37:29 +00:00
wiz
a6314af3f3 openssl: update to 1.1.1h.
Major changes between OpenSSL 1.1.1g and OpenSSL 1.1.1h [22 Sep 2020]

      o Disallow explicit curve parameters in verifications chains when
        X509_V_FLAG_X509_STRICT is used
      o Enable 'MinProtocol' and 'MaxProtocol' to configure both TLS and DTLS
        contexts
      o Oracle Developer Studio will start reporting deprecation warnings
2020-09-30 09:25:30 +00:00
wiz
00da7815c0 *: bump PKGREVISION for perl-5.32. 2020-08-31 18:06:29 +00:00
sjmulder
0c05b5775a security/openssl: Make compatible with Apple Silicon 2020-07-22 20:41:30 +00:00
jperkin
08f0bc628c openssl: Fix c_rehash manual page entry.
Previously after the openssl-* renames it ended up as a dangling symlink,
causing "pkg_admin check" failures.  Bump PKGREVISION.
2020-07-13 11:35:54 +00:00
hauke
66f2118d10 Unbreak security/openssl build on pre-v9 Darwin.
(1) There is no {get,make,set}context support before Darwin 9

(2) Instead of failing the build on makedepend(8) malfunction, have
make(1) ignore its return value - which used to be the default for
previous OpenSSL versions.
2020-07-10 10:04:54 +00:00
nia
88b26a542f openssl: Pass explicit libdir
Some linuxes have /lib64. pkgsrc should never use /lib64.

Pointed out by sobukus on freenode
2020-05-21 10:41:36 +00:00
nia
11259d9498 openssl: Fix KERN_ARND usage on NetBSD.
XXX upstream
2020-04-30 11:21:57 +00:00
sevan
ae68f6f7a7 Update to OpenSSL 1.1.1g
Major changes between OpenSSL 1.1.1f and OpenSSL 1.1.1g [21 Apr 2020]

   Fixed segmentation fault in SSL_check_chain() (CVE-2020-1967)
2020-04-21 13:29:35 +00:00
sevan
b705b40ee9 Update to openssl 1.1.1f
Changes between 1.1.1e and 1.1.1f

* Revert the unexpected EOF reporting via SSL_ERROR_SSL
2020-03-31 15:02:31 +00:00
wiz
daf276c903 openssl: update to 1.1.1e.
Major changes between OpenSSL 1.1.1d and OpenSSL 1.1.1e [17 Mar 2020]

      o Fixed an overflow bug in the x64_64 Montgomery squaring procedure
        used in exponentiation with 512-bit moduli (CVE-2019-1551)
2020-03-22 18:23:34 +00:00
jperkin
bdc0eb23c9 openssl: Spell x86_64 correctly. 2020-02-12 19:49:23 +00:00
rillig
f64e0028f3 security/openssl: fix the recent fix for building on Solaris and HP-UX 2020-02-12 15:14:57 +00:00
rillig
8b4fff4dbe security/openssl: fix build on Solaris
This fixes PR pkg/54894.
2020-02-11 17:23:11 +00:00
jperkin
15c21264dd openssl: Handle i386 SunOS.
The OpenSSL config script isn't clever enough to detect multiarch platforms so
we need to manually specify the host OS.
2020-02-11 09:58:50 +00:00
jperkin
26c1bffc9f *: Recursive revision bump for openssl 1.1.1. 2020-01-18 21:48:19 +00:00
wiz
80e3e55259 openssl: rc5 patents expired some years ago
Remove its LICENSE line and enable rc5 option by default.
Bump PKGREVISION.
2020-01-16 22:45:45 +00:00
jperkin
6a6a869481 openssl: Update to 1.1.1d.
This is a major upgrade to the current LTS release.  1.0.2 and 1.1.0 are now
out of support and should not be used.

pkgsrc changes include a large cleanup of patches and targets, many of which
were clearly bogus, for example a CONFLICTS entry against a package that has
never existed, and one that was removed in 1999.

Tested on SmartOS, macOS, and NetBSD.  Used for the SmartOS pkgsrc-2019Q4 LTS
release.

There are far too many individual changes to list, so the following text is
instead taken from the 1.1.1 blog announcement:

  --------------------------------------------------------------------------

After two years of work we are excited to be releasing our latest version today
- OpenSSL 1.1.1. This is also our new Long Term Support (LTS) version and so we
are committing to support it for at least five years.

OpenSSL 1.1.1 has been a huge team effort with nearly 5000 commits having been
made from over 200 individual contributors since the release of OpenSSL 1.1.0.
These statistics just illustrate the amazing vitality and diversity of the
OpenSSL community. The contributions didn't just come in the form of commits
though. There has been a great deal of interest in this new version so thanks
needs to be extended to the large number of users who have downloaded the beta
releases to test them out and report bugs.

The headline new feature is TLSv1.3. This new version of the Transport Layer
Security (formerly known as SSL) protocol was published by the IETF just one
month ago as RFC8446. This is a major rewrite of the standard and introduces
significant changes, features and improvements which have been reflected in the
new OpenSSL version.

What's more is that OpenSSL 1.1.1 is API and ABI compliant with OpenSSL 1.1.0
so most applications that work with 1.1.0 can gain many of the benefits of
TLSv1.3 simply by dropping in the new OpenSSL version. Since TLSv1.3 works very
differently to TLSv1.2 though there are a few caveats that may impact a
minority of applications. See the TLSv1.3 page on the OpenSSL wiki for more
details.

Some of the benefits of TLSv1.3 include:

 * Improved connection times due to a reduction in the number of round trips
   required between the client and server

 * The ability, in certain circumstances, for clients to start sending
   encrypted data to the server straight away without any round trips with the
   server required (a feature known as 0-RTT or “early data”).

 * Improved security due to the removal of various obsolete and insecure
   cryptographic algorithms and encryption of more of the connection handshake

Other features in the 1.1.1 release include:

 * Complete rewrite of the OpenSSL random number generator to introduce the
   following capabilities:

   * The default RAND method now utilizes an AES-CTR DRBG according to NIST
     standard SP 800-90Ar1.
   * Support for multiple DRBG instances with seed chaining.
   * There is a public and private DRBG instance.
   * The DRBG instances are fork-safe.
   * Keep all global DRBG instances on the secure heap if it is enabled.
   * The public and private DRBG instance are per thread for lock free
     operation

 * Support for various new cryptographic algorithms including:

   * SHA3
   * SHA512/224 and SHA512/256
   * EdDSA (including Ed25519 and Ed448)
   * X448 (adding to the existing X25519 support in 1.1.0)
   * Multi-prime RSA
   * SM2
   * SM3
   * SM4
   * SipHash
   * ARIA (including TLS support)

 * Signficant Side-Channel attack security improvements

 * Maximum Fragment Length TLS extension support

 * A new STORE module, which implements a uniform and URI based reader of
   stores that can contain keys, certificates, CRLs and numerous other objects.

Since 1.1.1 is our new LTS release we are strongly advising all users to
upgrade as soon as possible. For most applications this should be straight
forward if they are written to work with OpenSSL 1.1.0. Since OpenSSL 1.1.0 is
not an LTS release it will start receiving security fixes only with immediate
affect as per our previous announcement and as published in our release
strategy. It will cease receiving all support in one years time.

Our previous LTS release (OpenSSL 1.0.2) will continue to receive full support
until the end of this year. After that it will receive security fixes only. It
will stop receiving all support at the end of 2019. Users of that release are
strongly advised to upgrade to OpenSSL 1.1.1.
2020-01-16 13:30:29 +00:00
sevan
9d1cf377ce Upgrade to OpenSSL 1.0.2u
Major changes between OpenSSL 1.0.2t and OpenSSL 1.0.2u [20 Dec 2019]

Fixed an an overflow bug in the x64_64 Montgomery squaring procedure used
in exponentiation with 512-bit moduli (CVE-2019-1551)
2020-01-02 20:31:05 +00:00
sevan
32442fec93 Update to v1.0.2t
Changes between 1.0.2s and 1.0.2t [10 Sep 2019]

   *) For built-in EC curves, ensure an EC_GROUP built from the curve name is
      used even when parsing explicit parameters, when loading a serialized key
      or calling `EC_GROUP_new_from_ecpkparameters()`/
      `EC_GROUP_new_from_ecparameters()`.
      This prevents bypass of security hardening and performance gains,
      especially for curves with specialized EC_METHODs.
      By default, if a key encoded with explicit parameters is loaded and later
      serialized, the output is still encoded with explicit parameters, even if
      internally a "named" EC_GROUP is used for computation.
      [Nicola Tuveri]

  *) Compute ECC cofactors if not provided during EC_GROUP construction. Before
     this change, EC_GROUP_set_generator would accept order and/or cofactor as
     NULL. After this change, only the cofactor parameter can be NULL. It also
     does some minimal sanity checks on the passed order.
     (CVE-2019-1547)
     [Billy Bob Brumley]

  *) Fixed a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey.
     An attack is simple, if the first CMS_recipientInfo is valid but the
     second CMS_recipientInfo is chosen ciphertext. If the second
     recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct
     encryption key will be replaced by garbage, and the message cannot be
     decoded, but if the RSA decryption fails, the correct encryption key is
     used and the recipient will not notice the attack.
     As a work around for this potential attack the length of the decrypted
     key must be equal to the cipher default key length, in case the
     certifiate is not given and all recipientInfo are tried out.
     The old behaviour can be re-enabled in the CMS code by setting the
     CMS_DEBUG_DECRYPT flag.
     (CVE-2019-1563)
     [Bernd Edlinger]

  *) Document issue with installation paths in diverse Windows builds

     '/usr/local/ssl' is an unsafe prefix for location to install OpenSSL
     binaries and run-time config file.
     (CVE-2019-1552)
     [Richard Levitte]
2019-11-26 22:22:45 +00:00
gdt
1a6204f237 security/openssl: Fix recent use of empty()
Should resolve build on SmartOS.
(Amazingly, the wrong expression worked fine on NetbSD with gcc when
it was tested.)
2019-11-24 01:45:12 +00:00
gdt
2a81e96cdb security/openssl: Check for compling with gcc and clang correctly 2019-11-23 19:44:16 +00:00
rillig
9fd786bb11 security: align variable assignments
pkglint -Wall -F --only aligned --only indent -r

No manual corrections.
2019-11-04 21:12:51 +00:00
wiz
84e123ddd2 Bump PKGREVISIONs for perl 5.30.0 2019-08-11 13:17:48 +00:00
sevan
9a69aa3c97 Update to 1.0.2
Tested on OS X Tiger PowerPC and NetBSD-HEAD amd64

Changes between 1.0.2r and 1.0.2s [28 May 2019]

  *) Change the default RSA, DSA and DH size to 2048 bit instead of 1024.
     This changes the size when using the genpkey app when no size is given. It
     fixes an omission in earlier changes that changed all RSA, DSA and DH
     generation apps to use 2048 bits by default.
     [Kurt Roeckx]

  *) Add FIPS support for Android Arm 64-bit

     Support for Android Arm 64-bit was added to the OpenSSL FIPS Object
     Module in Version 2.0.10. For some reason, the corresponding target
     'android64-aarch64' was missing OpenSSL 1.0.2, whence it could not be
     built with FIPS support on Android Arm 64-bit. This omission has been
     fixed.
     [Matthias St. Pierre]

Changes between 1.0.2q and 1.0.2r [26 Feb 2019]

  *) 0-byte record padding oracle

     If an application encounters a fatal protocol error and then calls
     SSL_shutdown() twice (once to send a close_notify, and once to receive one)
     then OpenSSL can respond differently to the calling application if a 0 byte
     record is received with invalid padding compared to if a 0 byte record is
     received with an invalid MAC. If the application then behaves differently
     based on that in a way that is detectable to the remote peer, then this
     amounts to a padding oracle that could be used to decrypt data.

     In order for this to be exploitable "non-stitched" ciphersuites must be in
     use. Stitched ciphersuites are optimised implementations of certain
     commonly used ciphersuites. Also the application must call SSL_shutdown()
     twice even if a protocol error has occurred (applications should not do
     this but some do anyway).

     This issue was discovered by Juraj Somorovsky, Robert Merget and Nimrod
     Aviram, with additional investigation by Steven Collison and Andrew
     Hourselt. It was reported to OpenSSL on 10th December 2018.
     (CVE-2019-1559)
     [Matt Caswell]

  *) Move strictness check from EVP_PKEY_asn1_new() to EVP_PKEY_asn1_add0().
     [Richard Levitte]

 Changes between 1.0.2p and 1.0.2q [20 Nov 2018]

  *) Microarchitecture timing vulnerability in ECC scalar multiplication

     OpenSSL ECC scalar multiplication, used in e.g. ECDSA and ECDH, has been
     shown to be vulnerable to a microarchitecture timing side channel attack.
     An attacker with sufficient access to mount local timing attacks during
     ECDSA signature generation could recover the private key.

     This issue was reported to OpenSSL on 26th October 2018 by Alejandro
     Cabrera Aldaya, Billy Brumley, Sohaib ul Hassan, Cesar Pereida Garcia and
     Nicola Tuveri.
     (CVE-2018-5407)
     [Billy Brumley]

  *) Timing vulnerability in DSA signature generation

     The OpenSSL DSA signature algorithm has been shown to be vulnerable to a
     timing side channel attack. An attacker could use variations in the signing
     algorithm to recover the private key.

     This issue was reported to OpenSSL on 16th October 2018 by Samuel Weiser.
     (CVE-2018-0734)
     [Paul Dale]

  *) Resolve a compatibility issue in EC_GROUP handling with the FIPS Object
     Module, accidentally introduced while backporting security fixes from the
     development branch and hindering the use of ECC in FIPS mode.
     [Nicola Tuveri]
2019-06-30 22:52:54 +00:00
fhajny
fbd28ecc36 security/openssl: Update to 1.0.2p.
- Client DoS due to large DH parameter

  During key agreement in a TLS handshake using a DH(E) based ciphersuite a
  malicious server can send a very large prime value to the client. This will
  cause the client to spend an unreasonably long period of time generating a
  key for this prime resulting in a hang until the client has finished. This
  could be exploited in a Denial Of Service attack.

  This issue was reported to OpenSSL on 5th June 2018 by Guido Vranken
  (CVE-2018-0732)
  [Guido Vranken]

- Cache timing vulnerability in RSA Key Generation

  The OpenSSL RSA Key generation algorithm has been shown to be vulnerable to
  a cache timing side channel attack. An attacker with sufficient access to
  mount cache timing attacks during the RSA key generation process could
  recover the private key.

  This issue was reported to OpenSSL on 4th April 2018 by Alejandro Cabrera
  Aldaya, Billy Brumley, Cesar Pereida Garcia and Luis Manuel Alvarez Tapia.
  (CVE-2018-0737)
  [Billy Brumley]

- Make EVP_PKEY_asn1_new() a bit stricter about its input.  A NULL pem_str
  parameter is no longer accepted, as it leads to a corrupt table.  NULL
  pem_str is reserved for alias entries only.
  [Richard Levitte]

- Revert blinding in ECDSA sign and instead make problematic addition
  length-invariant. Switch even to fixed-length Montgomery multiplication.
  [Andy Polyakov]

- Change generating and checking of primes so that the error rate of not
  being prime depends on the intended use based on the size of the input.
  For larger primes this will result in more rounds of Miller-Rabin.
  The maximal error rate for primes with more than 1080 bits is lowered
  to 2^-128.
  [Kurt Roeckx, Annie Yousar]

- Increase the number of Miller-Rabin rounds for DSA key generating to 64.
  [Kurt Roeckx]

- Add blinding to ECDSA and DSA signatures to protect against side channel
  attacks discovered by Keegan Ryan (NCC Group).
  [Matt Caswell]

- When unlocking a pass phrase protected PEM file or PKCS#8 container, we
  now allow empty (zero character) pass phrases.
  [Richard Levitte]

- Certificate time validation (X509_cmp_time) enforces stricter
  compliance with RFC 5280. Fractional seconds and timezone offsets
  are no longer allowed.
  [Emilia Käsper]
2018-09-12 12:44:17 +00:00
wiz
93b46879c7 Recursive bump for perl5-5.28.0 2018-08-22 09:43:40 +00:00
wiz
6bef8dfa4d openssl: update to 1.0.2o.
Changes between 1.0.2n and 1.0.2o [27 Mar 2018]

  *) Constructed ASN.1 types with a recursive definition could exceed the stack

     Constructed ASN.1 types with a recursive definition (such as can be found
     in PKCS7) could eventually exceed the stack given malicious input with
     excessive recursion. This could result in a Denial Of Service attack. There
     are no such structures used within SSL/TLS that come from untrusted sources
     so this is considered safe.

     This issue was reported to OpenSSL on 4th January 2018 by the OSS-fuzz
     project.
     (CVE-2018-0739)
     [Matt Caswell]
2018-03-29 11:08:44 +00:00
maya
e48d11bf83 Remove traces of crypto restrictions from packages.
ok for idea riastradh.
2018-01-02 05:37:22 +00:00
tron
6a78edf09a openssl: Fix packaging under macOS
The last change for fixing packaging under macOS did not work when
the object directory resides on a case insensitive file-system.
2017-12-14 20:44:20 +00:00
jperkin
d18dbcfde9 openssl: Avoid case-sensitive issue on Darwin. Bump PKGREVISION. 2017-12-14 09:18:47 +00:00
fhajny
b26be6dc85 Update security/openssl to 1.0.2n.
Read/write after SSL object in error state (CVE-2017-3737)
==========================================================

Severity: Moderate

OpenSSL 1.0.2 (starting from version 1.0.2b) introduced an "error state"
mechanism. The intent was that if a fatal error occurred during a handshake then
OpenSSL would move into the error state and would immediately fail if you
attempted to continue the handshake. This works as designed for the explicit
handshake functions (SSL_do_handshake(), SSL_accept() and SSL_connect()),
however due to a bug it does not work correctly if SSL_read() or SSL_write() is
called directly. In that scenario, if the handshake fails then a fatal error
will be returned in the initial function call. If SSL_read()/SSL_write() is
subsequently called by the application for the same SSL object then it will
succeed and the data is passed without being decrypted/encrypted directly from
the SSL/TLS record layer.

In order to exploit this issue an application bug would have to be present that
resulted in a call to SSL_read()/SSL_write() being issued after having already
received a fatal error.

rsaz_1024_mul_avx2 overflow bug on x86_64 (CVE-2017-3738)
=========================================================

Severity: Low

There is an overflow bug in the AVX2 Montgomery multiplication procedure
used in exponentiation with 1024-bit moduli. No EC algorithms are affected.
Analysis suggests that attacks against RSA and DSA as a result of this defect
would be very difficult to perform and are not believed likely. Attacks
against DH1024 are considered just feasible, because most of the work
necessary to deduce information about a private key may be performed offline.
The amount of resources required for such an attack would be significant.
However, for an attack on TLS to be meaningful, the server would have to share
the DH1024 private key among multiple clients, which is no longer an option
since CVE-2016-0701.

This only affects processors that support the AVX2 but not ADX extensions
like Intel Haswell (4th generation).
2017-12-09 18:02:02 +00:00
bsiegert
7a2c6a3e34 Update openssl to 1.0.2m.
This is a recommended security update.

Changes between 1.0.2l and 1.0.2m [2 Nov 2017]

 *) bn_sqrx8x_internal carry bug on x86_64

    There is a carry propagating bug in the x86_64 Montgomery squaring
    procedure. No EC algorithms are affected. Analysis suggests that attacks
    against RSA and DSA as a result of this defect would be very difficult to
    perform and are not believed likely. Attacks against DH are considered just
    feasible (although very difficult) because most of the work necessary to
    deduce information about a private key may be performed offline. The amount
    of resources required for such an attack would be very significant and
    likely only accessible to a limited number of attackers. An attacker would
    additionally need online access to an unpatched system using the target
    private key in a scenario with persistent DH parameters and a private
    key that is shared between multiple clients.

    This only affects processors that support the BMI1, BMI2 and ADX extensions
    like Intel Broadwell (5th generation) and later or AMD Ryzen.

    This issue was reported to OpenSSL by the OSS-Fuzz project.
    (CVE-2017-3736)
    [Andy Polyakov]

 *) Malformed X.509 IPAddressFamily could cause OOB read

    If an X.509 certificate has a malformed IPAddressFamily extension,
    OpenSSL could do a one-byte buffer overread. The most likely result
    would be an erroneous display of the certificate in text format.

    This issue was reported to OpenSSL by the OSS-Fuzz project.
    (CVE-2017-3735)
    [Rich Salz]

Changes between 1.0.2k and 1.0.2l [25 May 2017]

 *) Have 'config' recognise 64-bit mingw and choose 'mingw64' as the target
    platform rather than 'mingw'.
    [Richard Levitte]
2017-11-24 20:34:23 +00:00
tez
36c9239fb9 openssl: fix for CVE-2017-3735 2017-09-22 21:02:43 +00:00
bsiegert
86ff88639f Overhaul the platform selector logic, so that the right value is selected
for powerpc64 on Darwin. Fix for PR pkg/52114.
2017-08-05 11:06:29 +00:00
jperkin
ea3fff073d Update security/openssl to 1.0.2k.
Changes between 1.0.2j and 1.0.2k [26 Jan 2017]

  *) Truncated packet could crash via OOB read

     If one side of an SSL/TLS path is running on a 32-bit host and a specific
     cipher is being used, then a truncated packet can cause that host to
     perform an out-of-bounds read, usually resulting in a crash.

     This issue was reported to OpenSSL by Robert Święcki of Google.
     (CVE-2017-3731)
     [Andy Polyakov]

  *) BN_mod_exp may produce incorrect results on x86_64

     There is a carry propagating bug in the x86_64 Montgomery squaring
     procedure. No EC algorithms are affected. Analysis suggests that attacks
     against RSA and DSA as a result of this defect would be very difficult to
     perform and are not believed likely. Attacks against DH are considered just
     feasible (although very difficult) because most of the work necessary to
     deduce information about a private key may be performed offline. The amount
     of resources required for such an attack would be very significant and
     likely only accessible to a limited number of attackers. An attacker would
     additionally need online access to an unpatched system using the target
     private key in a scenario with persistent DH parameters and a private
     key that is shared between multiple clients. For example this can occur by
     default in OpenSSL DHE based SSL/TLS ciphersuites. Note: This issue is very
     similar to CVE-2015-3193 but must be treated as a separate problem.

     This issue was reported to OpenSSL by the OSS-Fuzz project.
     (CVE-2017-3732)
     [Andy Polyakov]

  *) Montgomery multiplication may produce incorrect results

     There is a carry propagating bug in the Broadwell-specific Montgomery
     multiplication procedure that handles input lengths divisible by, but
     longer than 256 bits. Analysis suggests that attacks against RSA, DSA
     and DH private keys are impossible. This is because the subroutine in
     question is not used in operations with the private key itself and an input
     of the attacker's direct choice. Otherwise the bug can manifest itself as
     transient authentication and key negotiation failures or reproducible
     erroneous outcome of public-key operations with specially crafted input.
     Among EC algorithms only Brainpool P-512 curves are affected and one
     presumably can attack ECDH key negotiation. Impact was not analyzed in
     detail, because pre-requisites for attack are considered unlikely. Namely
     multiple clients have to choose the curve in question and the server has to
     share the private key among them, neither of which is default behaviour.
     Even then only clients that chose the curve will be affected.

     This issue was publicly reported as transient failures and was not
     initially recognized as a security issue. Thanks to Richard Morgan for
     providing reproducible case.
     (CVE-2016-7055)
     [Andy Polyakov]

  *) OpenSSL now fails if it receives an unrecognised record type in TLS1.0
     or TLS1.1. Previously this only happened in SSLv3 and TLS1.2. This is to
     prevent issues where no progress is being made and the peer continually
     sends unrecognised record types, using up resources processing them.
     [Matt Caswell]
2017-01-26 16:31:57 +00:00
marino
23f4efbcb7 security/openssl: USE_TOOLS+= makedepend
solves:
=> Bootstrap dependency digest>=20010302: found digest-20160304
===> Building for openssl-1.0.2jnb1
making depend in crypto...
gmake[1]: Entering directory '/construction/security/openssl/work/openssl-1.0.2j/crypto'
../util/domd: makedepend: not found
2016-12-06 18:18:54 +00:00
wiz
a7cddc437b Remove incorrect comment and resulting weird license.
idea and mdc2 patents expired, so enable them by default.
rc5 looks like it might be expired as well, but I didn't find
anything relevant on that topic, so I left it alone.

Bump PKGREVISION.
2016-10-03 11:55:11 +00:00
jperkin
c3dbcc24e8 Update security/openssl to 1.0.2j.
Changes between 1.0.2i and 1.0.2j [26 Sep 2016]

  *) Missing CRL sanity check

     A bug fix which included a CRL sanity check was added to OpenSSL 1.1.0
     but was omitted from OpenSSL 1.0.2i. As a result any attempt to use
     CRLs in OpenSSL 1.0.2i will crash with a null pointer exception.

     This issue only affects the OpenSSL 1.0.2i
     (CVE-2016-7052)
     [Matt Caswell]
2016-09-26 12:27:55 +00:00