From Wikipedia, the free encyclopedia
Jump to: navigation, search
Puffy, the mascot of OpenBSD, made to resemble Che Guevara
Developer(s) The OpenBSD Project
Stable release 2.1.3 (January 22, 2015; 5 days ago (2015-01-22) [1]) [±]
Written in C, assembly
Operating system OpenBSD
Type Security library
License Apache License 1.0, 4-clause BSD License, ISC License, and some are public domain

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,[2][3][4][5][6] with the aim of refactoring the OpenSSL code so as to provide a more secure implementation.[7]

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.[8]


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

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

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

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

On 11 July 2014, the first portable version of LibreSSL was released as version 2.0.0.[20][21]



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.).[22][23] 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 CVS commit logs (including explicit assignments of NULL pointer values).[24] 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[edit]

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.


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).[25][26] 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).

Disabling of old insecure features by default[edit]

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.[27]

Code removal[edit]

One of the initial features removed from LibreSSL in response to Heartbleed was the heartbeat functionality itself.[28] In addition, there has been removal of unneeded operating systems and hardware architectures (Classic Mac OS, NetWare, OS/2, VMS, 16-bit Windows, etc.), preprocessor macros that have been deemed unnecessary or insecure, and older unneeded files for assembly language, C, and Perl.

The Dual_EC_DRBG algorithm, which is suspected of having a back door,[29] was cut along with support for the FIPS 140-2 standard that required it. Unused protocols and insecure algorithms have also been removed, including MD2, SSL v2, Kerberos, J-PAKE, and SRP.

Bug backlog[edit]

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.[30]

See also[edit]


  1. ^ "LibreSSL 2.1.3 released". 2015-01-22. Retrieved 2015-01-22. 
  2. ^ a b Unangst, Ted (22 April 2014). "Origins of libressl". flak. Retrieved 24 April 2014. 
  3. ^ Kemer, Sean Michael (22 April 2014). "After Heartbleed, OpenSSL Is Forked Into LibreSSL". eWeek. Retrieved 24 April 2014. 
  4. ^ "Not Just a Cleanup Any More: LibreSSL Project Announced". Slashdot. 22 April 2014. Retrieved 24 April 2014. 
  5. ^ Beck, Bob (17 May 2014). "LibreSSL: The first 30 days, and what the Future Holds Slides". Retrieved 17 May 2014. 
  6. ^ M, Constantine (17 May 2014). Soulskill, ed. "30-Day Status Update On LibreSSL". Slashdot. 
  7. ^ a b Seltzer, Larry (21 April 2014). "OpenBSD forks, prunes, fixes OpenSSL". Zero Day. ZDNet. Retrieved 21 April 2014. 
  8. ^ Hessler, Peter (15 April 2014). "OpenBSD has started a massive strip-down and cleanup of OpenSSL". OpenBSD Journal. Retrieved 24 April 2014. 
  9. ^ a b Brodkin, Jon (22 April 2014). "OpenSSL code beyond repair, claims creator of "LibreSSL" fork". Ars Technica. Retrieved 24 April 2014. 
  10. ^ McCallion, Jane (22 April 2014). "Heartbleed: LibreSSL scrubs "irresponsible" OpenSSL code". PC Pro. Retrieved 23 April 2014. 
  11. ^ Larabel, Michael (9 May 2014). "OpenBSD Affirms That LibreSSL Will Be Portable". Phoronix. Retrieved 30 May 2014. 
  12. ^ "oss-sec: Re: OpenSSL seven security fixes". Retrieved 2014-06-09. 
  13. ^ "'Re: new OpenSSL flaws' - MARC". 2014-06-05. Retrieved 2014-06-09. 
  14. ^ a b Langley, Adam (20 June 2014). "BoringSSL (20 Jun 2014)". ImperialViolet. Retrieved 2014-06-21. 
  15. ^ Goodin, Dan (20 June 2014). "Google unveils independent “fork” of OpenSSL called “BoringSSL”". Ars Technica. Retrieved 21 June 2014. 
  16. ^ Sing, Joel (21 June 2014). "OpenBSD — lib/libssl/src/crypto/evp evp_aead.c e_chacha20poly1305.c". Retrieved 21 June 2014. 
  17. ^ Raadt, Theo de (21 June 2014). "Boringssl and such".
  18. ^ Beck, Bob (8 July 2014). "OpenBSD - lib/libcrypto/crypto getentropy_osx.c getentropy_solaris.c". 
  19. ^ Beck, Bob (20 June 2014). "OpenBSD — lib/libcrypto/crypto getentropy_linux.c". 
  20. ^ "Index of /pub/OpenBSD/LibreSSL". 11 July 2014. Retrieved 11 July 2014. 
  21. ^ Beck, Bob (11 July 2014). "First release of LibreSSL portable is available". Retrieved 11 July 2014. 
  22. ^ Orr, William (23 April 2014). "A quick recap over the last week". OpenSSL Valhalla Rampage. Retrieved 30 April 2014. [self-published source?]
  23. ^ "OpenBSD LibreSSL CVS Calloc Commits". 
  24. ^ "OpenBSD LibreSSL CVS Double Free Commits". 
  25. ^ "OpenBSD LibreSSL CVS Insecure Seeding". 
  26. ^ "OpenBSD LibreSSL CVS Kernel Seeding". 
  27. ^ "LibreSSL 2.1.1 released.". LibreSSL. 2014-10-16. Retrieved 2014-10-20. 
  29. ^ Perlroth, Nicole (10 September 2013). "Government Announces Steps to Restore Confidence on Encryption Standards". The New York Times. Retrieved 9 May 2014. 
  30. ^ "OpenBSD LibreSSL CVS Buffer Release (#2167 bugfix) Commit". 10 April 2014. Retrieved 1 May 2014. 

External links[edit]