Jump to content

LibreSSL

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Tamersaadeh (talk | contribs) at 10:31, 24 June 2014 (Changes: They have removed the obsolete classic mac os, OS X (with *BSD and linux) will be supported after they begin porting it.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

LibReSSL
Developer(s)The OpenBSD Project
Repository
Written inC, assembly
Operating systemOpenBSD
TypeSecurity library
LicenseApache License 1.0, 4-clause BSD License, ISC License, and some are public domain
Websitehttp://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, the project was seeking a "stable commitment" of external funding.[8]

On June 5, 2014, several OpenSSL bugs became public. While several projects where notified in advance,[11] Theo de Raadt accused the OpenSSL developers to have intentionally withheld these informations 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] They have already relicensed some of their contributions under the ISC license at the behest of the LibreSSL developers.[13][15] On June 21, Theo de Raadt, welcomed BoringSSL and outlined the plans for LibReSSL-portable.[16]

Changes

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.).[17][18] 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).[19] 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).[20][21] 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, 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.[22] 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,[23] 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.[24]

See also

References

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