LibreSSL
Developer(s) | The OpenBSD Project |
---|---|
Stable release | 2.0.0
/ July 11, 2014 |
Repository | |
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 |
Website | http://www.libressl.org |
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,[1][2][3][4][5] with the aim of refactoring the OpenSSL code so as to provide a more secure implementation.[6]
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.[7]
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.[1] The libressl.org domain was registered on April 11; the project announced the name on April 22.
In the first week of code pruning, more than 90,000 lines of C code were removed.[6][8] 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.[9][10] As of April 2014[update], the project was seeking a "stable commitment" of external funding.[8]
On June 5, 2014, several OpenSSL bugs became public. While several projects were notified in advance,[11] LibReSSL was not; Theo de Raadt accused the OpenSSL developers of intentionally withholding this information from OpenBSD and LibReSSL.[12]
On June 20, 2014, Google created another fork of OpenSSL called BoringSSL, and promised to exchange fixes with LibReSSL.[13][14] Google has already relicensed some of its contributions under the ISC license, as it was requested by the LibreSSL developers.[13][15] On June 21, Theo de Raadt welcomed BoringSSL and outlined the plans for LibReSSL-portable.[16] Starting on 8 July, code porting for OS X and Solaris began,[17] while initial porting to Linux began on 20 June.[18]
On July 11, 2014, a portable version of LibReSSL was released as version 2.0.0.[19][20]
Changes
Memory-related
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.).[21][22] 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).[23] 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).[24][25] 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 RFC5639,[26] up to 512 bits in strength).
Code removal
One of the initial features removed from LibReSSL in response to Heartbleed was the heartbeat functionality itself.[27] In addition, there has been removal of unneeded operating systems and hardware architectures (Classic Mac OS, NetWare, OS/2, VMS, Windows, etc.), preprocessor macros that have been deemed unnecessary or insecure, and older demo/documentation files for Assembly, C, and Perl.
The Dual_EC_DRBG algorithm, which is suspected of having a back door,[28] 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
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.[29]
See also
References
- ^ a b Unangst, Ted (22 April 2014). "Origins of libressl". flak. Retrieved 24 April 2014.
- ^ Kemer, Sean Michael (22 April 2014). "After Heartbleed, OpenSSL Is Forked Into LibreSSL". eWeek. Retrieved 24 April 2014.
- ^ "Not Just a Cleanup Any More: LibreSSL Project Announced". Slashdot. 22 April 2014. Retrieved 24 April 2014.
- ^ Beck, Bob (17 May 2014). "LibreSSL: The first 30 days, and what the Future Holds Slides". Retrieved 17 May 2014.
- ^ M, Constantine (17 May 2014). Soulskill (ed.). "30-Day Status Update On LibreSSL". Slashdot.
- ^ a b Seltzer, Larry (21 April 2014). "OpenBSD forks, prunes, fixes OpenSSL". Zero Day. ZDNet. Retrieved 21 April 2014.
- ^ Hessler, Peter (15 April 2014). "OpenBSD has started a massive strip-down and cleanup of OpenSSL". OpenBSD Journal. Retrieved 24 April 2014.
- ^ a b Brodkin, Jon (22 April 2014). "OpenSSL code beyond repair, claims creator of "LibreSSL" fork". Ars Technica. Retrieved 24 April 2014.
- ^ McCallion, Jane (22 April 2014). "Heartbleed: LibreSSL scrubs "irresponsible" OpenSSL code". PC Pro. Retrieved 23 April 2014.
- ^ Larabel, Michael (9 May 2014). "OpenBSD Affirms That LibreSSL Will Be Portable". Phoronix. Retrieved 30 May 2014.
- ^ "oss-sec: Re: OpenSSL seven security fixes". Seclists.org. Retrieved 9 June 2014.
- ^ "'Re: new OpenSSL flaws' - MARC". Marc.info. 5 June 2014. Retrieved 9 June 2014.
- ^ a b Langley, Adam (20 June 2014). "BoringSSL (20 Jun 2014)". ImperialViolet. Retrieved 21 June 2014.
- ^ Goodin, Dan (20 June 2014). "Google unveils independent "fork" of OpenSSL called "BoringSSL"". Ars Technica. Retrieved 21 June 2014.
- ^ Sing, Joel (21 June 2014). "OpenBSD — lib/libssl/src/crypto/evp evp_aead.c e_chacha20poly1305.c". Retrieved 21 June 2014.
- ^ Raadt, Theo de (21 June 2014). "Boringssl and such" (Mailing list).
- ^ Beck, Bob (8 July 2014). "OpenBSD - lib/libcrypto/crypto getentropy_osx.c getentropy_solaris.c".
- ^ Beck, Bob (20 June 2014). "OpenBSD — lib/libcrypto/crypto getentropy_linux.c".
- ^ "Index of /pub/OpenBSD/LibreSSL". 11 July 2014. Retrieved 11 July 2014.
- ^ Beck, Bob (11 July 2014). "First release of LibreSSL portable is available". Marc.info. Retrieved 11 July 2014.
- ^ Orr, William (23 April 2014). "A quick recap over the last week". OpenSSL Valhalla Rampage. Retrieved 30 April 2014.[self-published source?]
- ^ "OpenBSD LibreSSL CVS Calloc Commits".
- ^ "OpenBSD LibreSSL CVS Double Free Commits".
- ^ "OpenBSD LibreSSL CVS Insecure Seeding".
- ^ "OpenBSD LibreSSL CVS Kernel Seeding".
- ^ http://tools.ietf.org/html/rfc5639
- ^ "OpenBSD LibreSSL CVS OPENSSL_NO_HEARTBEAT".
- ^ Perlroth, Nicole (10 September 2013). "Government Announces Steps to Restore Confidence on Encryption Standards". The New York Times. Retrieved 9 May 2014.
- ^ "OpenBSD LibreSSL CVS Buffer Release (#2167 bugfix) Commit". 10 April 2014. Retrieved 1 May 2014.
External links
- Official website
- LibreSSL source code (OpenGrok)
- OpenSSL Valhalla Rampage (blog of highlights of the code cleanup)