Trisha Shetty (Editor)

LibreSSL

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Original author(s)
  
The OpenSSL Project

Developer(s)
  
The OpenBSD Project

Initial release
  
2.0.0 / 11 July 2014; 2 years ago (2014-07-11)

Stable release
  
2.4.5 (February 1, 2017; 43 days ago (2017-02-01)) [±] 2.3.10 (February 1, 2017; 43 days ago (2017-02-01)) [±]

Preview release
  
2.5.1 (February 1, 2017; 43 days ago (2017-02-01)) [±]

Repository
  
github.com/libressl-portable/portable

LibreSSL is an open-source implementation of the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols. It was forked from the OpenSSL cryptographic software library in April 2014 as a response by OpenBSD developers to the Heartbleed security vulnerability in OpenSSL, with the aim of refactoring the OpenSSL code so as to provide a more secure implementation.

Contents

LibreSSL was forked from the OpenSSL library starting with the 1.0.1g branch and will follow the security guidelines used elsewhere in the OpenBSD project.

History

After the Heartbleed bug in OpenSSL, the OpenBSD team audited the code afresh, and quickly realised they would need to maintain a fork themselves. The libressl.org domain was registered on 11 April 2014; the project announced the name on 22 April 2014.

In the first week of code pruning, more than 90,000 lines of C code were removed. Older or unused code has been removed, and support for some older or now-rare operating systems removed. LibreSSL was initially being developed as an intended replacement for OpenSSL in OpenBSD 5.6, and was then ported back to other platforms once a stripped-down version of the library was stable. As of April 2014, the project was seeking a "stable commitment" of external funding.

On 17 May 2014, Bob Beck presented "LibreSSL: The first 30 days, and what the Future Holds" during the 2014 BSDCan conference, in which he described the progress made in the first month, encountered issues, and implemented changes.

On 5 June 2014, several OpenSSL bugs became public. While several projects were notified in advance, LibreSSL was not; Theo de Raadt accused the OpenSSL developers of intentionally withholding this information from OpenBSD and LibreSSL.

On 20 June 2014, Google created another fork of OpenSSL called BoringSSL, and promised to exchange fixes with LibreSSL. Google has already relicensed some of its contributions under the ISC license, as it was requested by the LibreSSL developers. On 21 June 2014, Theo de Raadt welcomed BoringSSL and outlined the plans for LibreSSL-portable. Starting on 8 July, code porting for OS X and Solaris began, while the initial porting to Linux began on 20 June.

Version 2.0

On 11 July 2014, the first portable version of LibreSSL was released as version 2.0.0. The first release was quickly followed by 2.0.1 on 13 July, 2.0.2 on 16 July, 2.0.3 on 22 July, 2.0.4 on 3 August, and 2.0.5 on 5 August 2014. Many issues with the first portable release were fixed in the 2.0 series.

On 28 September 2014, Ted Unangst presented "LibreSSL: More Than 30 Days Later", in which he described the progress, issues and changes in the months since Bob Beck's BSDCan talk.

Version 2.1

With the version 2.1.0, released on 12 October 2014, the rate of changes in LibreSSL became considerably lower and LibreSSL became a usable alternative to OpenSSL. Most of the changes in the 2.1.x versions were related to security vulnerabilities found in OpenSSL.

Version 2.2

Version 2.2.0 was released on 11 June 2015 and introduces a preview of a new shared library libtls which aims to provide an easier to use API for SSL/TLS with default secure options. Other additions include AIX and Cygwin support. As usual simplifications and bugfixes are part of the release, many as a result of coverity scanning.

Notable changes in version 2.2 include disabling of SSLv3 and addition of the OPENSSL_NO_EGD flag which is the default for OpenSSL 1.1.0 as well.

Version 2.3

Version 2.3.0 was released on 23 September 2015 and marks the complete removal of SSLv3.

Other notable changes in version 2.3 are the removal of SHA-0, which was withdrawn shortly after publication. Also added was OpenBSD's netcat (nc) implementation with TLS support via LibreSSL's libtls library.

Version 2.4

Version 2.4.0 was released on 31 May 2016 and adds the official IETF ChaCha20-Poly1305 cipher suites. As of 2.4.2 (released 1 August 2016) this is the latest stable branch with the release of OpenBSD 6.0 (released 1 September 2016).

Version 2.5

Version 2.5.0 was released on 28 September 2016 and adds ALPN and SNI support and "secure", "compat", "legacy" and "insecure" cipher suite groups to libtls. Additionally this release contains a constant-time update for CVE-2016-0702.

Adoption

LibreSSL has been the default provider of TLS for:

  • Alpine Linux since 10 October 2016
  • Dragonfly BSD
  • HardenedBSD in release 11.0
  • Morpheus Linux
  • OpenBSD since version 5.6
  • OpenELEC since version 6.0 beta 2
  • the packages of TrueOS (formerly PC-BSD) since version 10.1.2
  • Void Linux since 6 August 2014
  • LibreSSL has been a selectable provider of TLS for:

  • the packages of FreeBSD since LibreSSL-portable was added to ports using a ports option
  • the packages of OPNsense since version 15.7 selectable as an option in the GUI
  • the packages of Gentoo as an ebuild overlay
  • In more detail, some of the more notable and important changes thus far include replacement of custom memory calls to ones in a standard library (for example, strlcpy, calloc, asprintf, reallocarray, etc.). This process may help later on to catch buffer overflow errors with more advanced memory analysis tools or by simply observing program crashes (via ASLR, use of the NX bit, stack canaries, etc.).

    Fixes for potential double free scenarios have also been cited in the VCS commit logs (including explicit assignments of NULL pointer values). There have been extra sanity checks also cited in the commit logs related to ensuring length arguments, unsigned-to-signed variable assignments, pointer values, and method returns.

    Proactive measures

    In order to maintain good programming practice, a number of compiler options and flags designed for safety have been enabled by default to help in spotting potential issues so they can be fixed earlier (-Wall, -Werror, -Wextra, -Wuninitialized). There have also been code readability updates which help future contributors in verifying program correctness (KNF, white-space, line-wrapping, etc.). Modification or removal of unneeded method wrappers and macros also help with code readability and auditing (Error and I/O abstraction library references).

    Changes were made to ensure that LibreSSL will be year 2038 compatible along with maintaining portability for other similar platforms. In addition, explicit_bzero and bn_clear calls were added to prevent the compiler from optimizing them out and prevent attackers from reading previously allocated memory.

    Cryptographic

    There were changes to help ensure proper seeding of random number generator-based methods via replacements of insecure seeding practices (taking advantage of features offered by the kernel itself natively). In terms of notable additions made, OpenBSD has added support for newer and more reputable algorithms (ChaCha stream cipher and Poly1305 message authentication code) along with a safer set of elliptic curves (brainpool curves from RFC 5639, up to 512 bits in strength).

    Added features

    The initial release of LibreSSL added a number of features: the ChaCha and Poly1305 algorithm, the Brainpool and ANSSI elliptic curves, and the AES-GCM and ChaCha20-Poly1305 AEAD modes.

    Later versions added the following:

  • 2.1.0: Automatic ephemeral EC keys
  • 2.1.2: Built-in arc4random implementation on OS X and FreeBSD
  • 2.1.2: Reworked GOST cipher suite support
  • 2.1.3: ALPN support
  • 2.1.3: SHA-256 Camellia cipher suites
  • 2.1.4: TLS_FALLBACK_SCSV server-side support
  • 2.1.4: certhash as a replacement of the c_rehash script
  • 2.1.4: X509_STORE_load_mem API for loading certificates from memory (enhance chroot support)
  • 2.1.4: Experimental Windows binaries
  • 2.1.5: Minor update mainly for improving Windows support, first working 32- and 64-bit binaries
  • 2.1.6: libtls declared stable and enabled by default
  • 2.2.0: AIX and Cygwin support
  • 2.2.1: Addition of EC_curve_nid2nist and EC_curve_nist2nid from OpenSSL, initial Windows XP/2003 support
  • 2.2.2: Defines LIBRESSL_VERSION_NUMBER, added TLS_*methods as a replacement for the SSLv23_*method calls, cmake build support
  • Old insecure features

    The initial release of LibreSSL disabled a number of features by default. Some of the code for these features was later removed, including Kerberos, US-Export ciphers, TLS compression, DTLS heartbeat, SSL v2 and SSL v3.

    Later versions disabled more features:

  • 2.1.1: Following the discovery of the POODLE vulnerability in the legacy SSL 3.0 protocol, LibreSSL now disables the use of SSL 3.0 by default.
  • 2.1.3: GOST R 34.10-94 signature authentication
  • 2.2.1: Removal of Dynamic Engine and MDC-2DES support
  • 2.2.2: Removal of SSLv3 from the openssl binary, removal of Internet Explorer 6 workarounds, RSAX engine.
  • 2.3.0: Complete removal of SSLv3, SHA-0 and DTLS1_BAD_VER
  • Code removal

    The initial release of LibreSSL has removed a number of features that were deemed insecure, unnecessary or deprecated as part of OpenBSD 5.6.

  • In response to Heartbleed, the heartbeat functionality was one of the first features to be removed
  • Unneeded platforms (Classic Mac OS, NetWare, OS/2, VMS, 16-bit Windows, etc.)
  • Support for platforms that do not exist, such as big-endian i386 and amd64
  • Support for old compilers
  • The IBM 4758, Broadcom ubsec, Sureware, Nuron, GOST, GMP, CSwift, CHIL, CAPI, Atalla and AEP engines were removed due to irrelevance of hardware or dependency on non-free libraries
  • The OpenSSL PRNG was removed (and replaced with ChaCha20-based implementation of arc4random)
  • Preprocessor macros that have been deemed unnecessary or insecure or were already deprecated in OpenSSL for a long time (e.g. des_old.h)
  • Older unneeded files for assembly language, C, and Perl (e.g. EGD)
  • MD2, SEED functionality
  • SSLv3, SHA-0, DTLS1_BAD_VER
  • The Dual_EC_DRBG algorithm, which is suspected of having a back door, was cut along with support for the FIPS 140-2 standard that required it. Unused protocols and insecure algorithms have also been removed, including the support for FIPS 140-2, MD4/MD5 J-PAKE, and SRP.

    Bug backlog

    One of the complaints of OpenSSL was the number of open bugs reported in the bug tracker that had gone unfixed for years. Older bugs are now being fixed in LibreSSL.

    Security and vulnerabilities

    Total vulnerabilities between the release of LibreSSL and the release of OpenSSL 1.0.2:

    Since the release of OpenSSL 1.0.2

    13 July 2014

    Shortly after the first portable release, LibreSSL's PRNG was found to not always reseed the PRNG when forking new processes, and to have low entropy for the seed when /dev/urandom was not available as might happen in a chroot jail. LibreSSL refers to this as the 'Linux forking and PID wrap issue'. This was fixed in LibreSSL 2.0.2.

    This vulnerability does not apply to OpenSSL and is a result of the refactoring of the PRNG code in LibreSSL.

    6 August 2014

    OpenSSL publishes 9 vulnerabilities and released version 1.0.1i fixing the vulnerabilities. LibreSSL releases version 2.0.5 fixing the 6 vulnerabilities that were also found in LibreSSL.

    15 October 2014

    OpenSSL responds to the POODLE attack, publishes 4 vulnerabilities and releases version 1.0.1j with fixes for these vulnerabilities. LibreSSL releases version 2.1.1.

    Note: LibreSSL reluctantly added TLS_SCSV_FALLBACK in version 2.1.4 "for compatibility with various auditor and vulnerability scanners".

    8 January 2015

    OpenSSL publishes 8 vulnerabilities discovered by the OpenSSL code review and released version 1.0.1k fixing the vulnerabilities. LibreSSL releases 2.1.4 with fixes for the CVEs that were applicable to LibreSSL.

    19 March 2015

    OpenSSL publishes 14 vulnerabilities discovered by the OpenSSL code review and releases versions 1.0.1m and 1.0.2a with fixes for the vulnerabilities. LibreSSL confirms that 5 of these vulnerabilities apply to LibreSSL as well. notably not CVE-2015-0291 which has the highest possible impact rating for OpenSSL since the code was new in the 1.0.2 branch. LibreSSL released 2.1.6 to fix these security issues.

    11 June 2015

    OpenSSL publishes seven vulnerabilities. and releases versions 1.0.1n and 1.0.2b with fixes for the vulnerabilities. LibreSSL confirms that three of these vulnerabilities apply to LibreSSL as well and one is still under review, releases 2.1.7 and 2.2.0.

    Note: CVE-2015-4000 was assigned with the second fix for this issue.

    9 July 2015

    OpenSSL publishes a single vulnerability and releases versions 1.0.1p and 1.0.2d with fixes for the vulnerability. Bob Beck announces that this vulnerability does not apply to LibreSSL.

    15 October 2015

    Qualys publishes a memory leak and buffer overflow vulnerability in all LibreSSL versions prior to 2.2.4. Ted Unangst announced release 2.2.4 of LibreSSL fixing the vulnerabilities.

    3 December 2015

    OpenSSL publishes five vulnerabilities. and releases versions 1.0.1q and 1.0.2e with fixes for the vulnerabilities. OpenBSD announced to which they were vulnerable and released 2.2.5 and 2.1.9 containing fixes.

    28 January 2016

    OpenSSL publishes two vulnerabilities and updates an earlier vulnerability and releases versions 1.0.1r and 1.0.2f with fixes for the vulnerability. LibreSSL releases versions 2.3.2, 2.2.6 and 2.1.10 containing corrections for the two vulnerabilities.

    1 March 2016

    On 1 March 2016 the OpenSSL project announced releases 1.0.1s and 1.0.2g addressing several security issues.

    3 May 2016

    On 3 May 2016 the OpenSSL project announced releases 1.0.1t and 1.0.2h addressing several security issues.

    22 September 2016

    On 22 September 2016 the OpenSSL project announced releases 1.0.1u, 1.0.2i and 1.1.0a addressing several security issues.

    26 September 2016

    On 26 September 2016 the OpenSSL project announced releases 1.0.2j and 1.1.0b addressing several security issues introduced by regressions in the 22 September 2016 release.

    10 November 2016

    On 10 November 2016 the OpenSSL project announced the following CVEs

    10 January 2017

    On 10 January 2017 a local ECDSA P-256 timing attack was disclosed. A local user can mount a cache-timing attack to recover ECDSA P-256 private keys.

    This vulnerability only affected the obsolete (unsupported) branch 1.0.1 of OpenSSL.

    References

    LibreSSL Wikipedia