Software:LibreSSL

From HandWiki
Short description: Open-source implementation of TLS protocols; forked from OpenSSL in 2014
LibreSSL
Puffy, the mascot of OpenBSD, made to resemble King Ferdinand[1]
Puffy, the mascot of OpenBSD, made to resemble King Ferdinand[1]
Original author(s)The OpenSSL Project
Developer(s)The OpenBSD Project
Initial release2.0.0 / 11 July 2014; 10 years ago (2014-07-11)
Stable release3.5.3 (18 May 2022; 2 years ago (2022-05-18)[2]) [±]
Written inC, assembly, Perl
Operating systemOpenBSD, FreeBSD, NetBSD, Linux, HP-UX, Solaris, macOS, Windows and others[3]
TypeCryptography library
LicenseApache-1.0, BSD-4-Clause, ISC, public domain
Websitewww.libressl.org

LibreSSL is an open-source implementation of the Transport Layer Security (TLS) protocol. The implementation is named after Secure Sockets Layer (SSL), the deprecated predecessor of TLS, for which support was removed in release 2.3.0. The OpenBSD project forked LibreSSL from OpenSSL 1.0.1g in April 2014 as a response to the Heartbleed security vulnerability,[4][5][6][7] with the goals of modernizing the codebase, improving security, and applying development best practices.[8][9][10]

History

After the Heartbleed security vulnerability was discovered in OpenSSL, the OpenBSD team audited the codebase and decided it was necessary to fork OpenSSL to remove dangerous code.[4] The libressl.org domain was registered on 11 April 2014; the project announced the name on 22 April 2014. In the first week of development, more than 90,000 lines of C code were removed.[9][11] Unused code was removed, and support for obsolete operating systems (Classic Mac OS, NetWare, OS/2, 16-bit Windows) and some older operating systems (OpenVMS) was removed.[12]

LibreSSL was initially developed as an intended replacement for OpenSSL in OpenBSD 5.6, and was ported to other platforms once a stripped-down version of the library was stable.[13] (As of April 2014), the project was seeking a "stable commitment" of external funding.[11] 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.[14] On 5 June 2014, several OpenSSL bugs became public. While several projects were notified in advance,[15] LibreSSL was not; Theo de Raadt accused the OpenSSL developers of intentionally withholding this information from OpenBSD and LibreSSL.[16]

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

As of 2021, OpenBSD uses LibreSSL as the primary SSL library. Alpine Linux supported LibreSSL as its primary TLS library for three years, until release 3.9.0 in January 2019. Gentoo supported LibreSSL until February 2021.[23] Python 3.10 drops LibreSSL support[24] after being supported since Python 3.4.3 (2015).[25]

Adoption

LibreSSL is the default provider of TLS for:

LibreSSL is the default provider of TLS for these now-discontinued systems:

LibreSSL is a selectable provider of TLS for:

Changes

Memory-related

Changes include replacement of custom memory calls to ones in a standard library (for example, strlcpy, calloc, asprintf, reallocarray, etc.).[38][self-published source?][39] This process may help later on to catch buffer overflow errors with more advanced memory analysis tools or by 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).[40] 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).[41][42] 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:[43]

  • 2.1.0: Automatic ephemeral EC keys.[44]
  • 2.1.2: Built-in arc4random implementation on macOS and FreeBSD.[45]
  • 2.1.2: Reworked GOST cipher suite support.
  • 2.1.3: ALPN support.[46]
  • 2.1.3: Support for SHA-256 and Camellia cipher suites.
  • 2.1.4: TLS FALLBACK SCSV server-side support.[47]
  • 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.[48]
  • 2.1.6: declared stable and enabled by default.[49]
  • 2.2.0: AIX and Cygwin support.[50]
  • 2.2.1: Addition of EC_curve_nid2nist and EC_curve_nist2nid[51] from OpenSSL, initial Windows XP/2003 support.
  • 2.2.2: Defines LIBRESSL_VERSION_NUMBER,[52] 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.[12] 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.[53]
  • 2.1.3: GOST R 34.10-94 signature authentication.[43][46]
  • 2.2.1: Removal of Dynamic Engine and MDC-2DES support[51]
  • 2.2.2: Removal of SSL 3.0 from the openssl binary, removal of Internet Explorer 6 workarounds, RSAX engine.[52]
  • 2.3.0: Complete removal of SSL 3.0, 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[54] was one of the first features to be removed.
  • Support for obsolete platforms (Classic Mac OS, NetWare, OS/2, 16-bit Windows) were removed.
  • Support for some older platforms (OpenVMS) was removed.
  • Support for platforms that do not exist, such as big-endian i386 and amd64.[55]
  • 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 had already been 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.
  • SSL 3.0, SHA-0, DTLS1_BAD_VER

The Dual EC DRBG algorithm, which is suspected of having a back door,[56] was cut along with support for the FIPS 140-2 standard that required[citation needed] it. Unused protocols and insecure algorithms have also been removed, including the support for FIPS 140-2,[57] MD4/MD5[43] J-PAKE,[12] and SRP.[58]

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

See also

References

  1. Cook, Brent (2 May 2017). "LibreSSL, almost Two Years Later". InfoSec Southwest. YouTube. https://www.youtube.com/watch?v=Yg3iPoZzt2Q&t=97. 
  2. "LibreSSL Releases". https://www.libressl.org/releases.html. 
  3. "LibreSSL Releases". http://www.libressl.org/releases.html. 
  4. 4.0 4.1 Unangst, Ted (22 April 2014). "Origins of libressl". flak. http://www.tedunangst.com/flak/post/origins-of-libressl. 
  5. Kemer, Sean Michael (22 April 2014). "After Heartbleed, OpenSSL Is Forked Into LibreSSL". eWeek. http://www.eweek.com/security/after-heartbleed-openssl-is-forked-into-libressl.html. 
  6. "Not Just a Cleanup Any More: LibreSSL Project Announced". Slashdot. 22 April 2014. http://it.slashdot.org/story/14/04/22/1240247/not-just-a-cleanup-any-more-libressl-project-announced. 
  7. M, Constantine (17 May 2014). "30-Day Status Update On LibreSSL". in Soulskill. Slashdot. http://it.slashdot.org/story/14/05/17/2250242/30-day-status-update-on-libressl. 
  8. "LibreSSL". http://www.libressl.org. 
  9. 9.0 9.1 Seltzer, Larry (21 April 2014). "OpenBSD forks, prunes, fixes OpenSSL". Zero Day. ZDNet. http://www.zdnet.com/openbsd-forks-prunes-fixes-openssl-7000028613/. 
  10. Hessler, Peter (15 April 2014). "OpenBSD has started a massive strip-down and cleanup of OpenSSL". OpenBSD Journal. http://www.undeadly.org/cgi?action=article&sid=20140415093252. 
  11. 11.0 11.1 Brodkin, Jon (22 April 2014). "OpenSSL code beyond repair, claims creator of "LibreSSL" fork". Ars Technica. https://arstechnica.com/information-technology/2014/04/openssl-code-beyond-repair-claims-creator-of-libressl-fork/. 
  12. 12.0 12.1 12.2 12.3 Jacoutot, Antoine (1 November 2014). "OpenBSD 5.6 Released". openbsd-announce (Mailing list). Retrieved 28 October 2015.
  13. McCallion, Jane (22 April 2014). "Heartbleed: LibreSSL scrubs "irresponsible" OpenSSL code". PC Pro. http://www.pcpro.co.uk/news/security/388309/heartbleed-libressl-scrubs-irresponsible-openssl-code. 
  14. Beck, Bob (17 May 2014). "LibreSSL: The first 30 days, and what the Future Holds Slides". http://www.openbsd.org/papers/bsdcan14-libressl/mgp00003.html. 
  15. "Re: OpenSSL seven security fixes". oss-sec (Mailing list). 5 June 2014. Retrieved 9 June 2014.
  16. de Raadt, Theo (5 June 2014). "Re: new OpenSSL flaws". openbsd-misc (Mailing list). Retrieved 9 June 2014. Cite has empty unknown parameter: |1= (help)
  17. 17.0 17.1 Langley, Adam (20 June 2014). "BoringSSL (20 Jun 2014)". https://www.imperialviolet.org/2014/06/20/boringssl.html. 
  18. Goodin, Dan (20 June 2014). "Google unveils independent "fork" of OpenSSL called "BoringSSL"". Ars Technica. https://arstechnica.com/security/2014/06/google-unveils-independent-fork-of-openssl-called-boringssl/. 
  19. Sing, Joel (21 June 2014). "OpenBSD — lib/libssl/src/crypto/evp evp_aead.c e_chacha20poly1305.c". https://secure.freshbsd.org/commit/openbsd/ef62f9c8a51b8fb8ce21e1486986f8f3dc7f50a3. 
  20. de Raadt, Theo (21 June 2014). "Boringssl and such". openbsd-tech (Mailing list). Retrieved 28 October 2015.
  21. Beck, Bob (8 July 2014). "OpenBSD - lib/libcrypto/crypto getentropy_osx.c getentropy_solaris.c". https://secure.freshbsd.org/commit/openbsd/bb95c69c5dea2b7ae53fb1036904c27c038bd2b0. 
  22. Beck, Bob (20 June 2014). "OpenBSD — lib/libcrypto/crypto getentropy_linux.c". https://secure.freshbsd.org/commit/openbsd/1d7eab2186ba0e70b976372401977c2c784ef30a. 
  23. "LibreSSL languishes on Linux [LWN.net"]. https://lwn.net/SubscriberLink/841664/0ba4265680b9dadf/. 
  24. "PEP 644 -- Require OpenSSL 1.1.1 or newer". https://www.python.org/dev/peps/pep-0644/#libressl-support. 
  25. "Changelog — Python 3.4.10 documentation". https://docs.python.org/3.4/whatsnew/changelog.html#python-3-4-3-final. 
  26. Marino, John. "[Beta Switch base to use private LibreSSL libraries"]. https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/304ca408000cd34559ef5319b4b5a6766d6eb35b. 
  27. "Milky Way v0.3 release". Hyperbola Project. 23 September 2019. https://www.hyperbola.info/news/milky-way-v03-release/. 
  28. Raue, Stephan. "OpenELEC Mediacenter - [Beta OpenELEC 6.0 Beta 2 released"]. http://openelec.tv/news/22-releases/165-beta-openelec-6-0-beta-2-released. 
  29. "PC-BSD Evolves into TrueOS". https://www.trueos.org/2016/09/01/pc-bsd-evolves-into-trueos/. 
  30. VonFange, Mark. "PC-BSD 10.1.2: an Interview with Kris Moore". Official PC-BSD Blog. http://blog.pcbsd.org/2015/05/pc-bsd-10-1-2-an-interview-with-kris-moore/. 
  31. "Add DEFAULT_VERSIONS=ssl=XXX". https://svnweb.freebsd.org/ports?view=revision&revision=416965. 
  32. "Project:LibreSSL - Gentoo". https://wiki.gentoo.org/wiki/Project:LibreSSL. 
  33. Górny, Michał (2021-01-05). "LibreSSL support discontinued". https://www.gentoo.org/support/news-items/2021-01-05-libressl-support-discontinued.html. 
  34. Górny, Michał (2020-12-31). "Bug 762847 - dev-libs/libressl: Removal". https://bugs.gentoo.org/762847. 
  35. Górny, Michał (28 Dec 2020). "[gentoo-dev [RFC] Discontinuing LibreSSL support?"]. https://archives.gentoo.org/gentoo-dev/message/9a92320c599e63c8c18b2ed29050f22f. 
  36. "OPNsense version 15.7 Released". OPNsense. https://opnsense.org/opnsense-version-15-7-released/. 
  37. "OPNsense version 22.7 Released". OPNsense. https://forum.opnsense.org/index.php?topic=29507.0. 
  38. Orr, William (23 April 2014). "A quick recap over the last week". OpenSSL Valhalla Rampage. http://opensslrampage.org/post/83631316689/a-quick-recap-over-the-last-week. 
  39. "OpenBSD LibreSSL CVS Calloc Commits". https://secure.freshbsd.org/search?project=openbsd&q=libssl+calloc. 
  40. "OpenBSD LibreSSL CVS Double Free Commits". https://secure.freshbsd.org/search?project=openbsd&q=libssl+double+free. 
  41. "OpenBSD LibreSSL CVS insecure seeding". http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/src/crypto/rsa/rsa_crpt.c.diff?r1=1.2&r2=1.3. 
  42. "OpenBSD LibreSSL CVS Kernel Seeding". https://secure.freshbsd.org/commit/openbsd/58777eed1cff7c5b34cbc026278f730176a6dbc2. 
  43. 43.0 43.1 43.2 "LibreSSL-portable ChangeLog". LibreSSL. 15 October 2021. https://github.com/libressl-portable/portable/blob/master/ChangeLog. 
  44. Beck, Bob (12 October 2014). "LibreSSL 2.1.0 released". openbsd-announce (Mailing list). Retrieved 28 October 2015.
  45. Beck, Bob (9 December 2014). "LibreSSL 2.1.2 released". openbsd-announce (Mailing list). Retrieved 28 October 2015.
  46. 46.0 46.1 Cook, Brent (22 January 2015). "LibreSSL 2.1.3 released". openbsd-announce (Mailing list). Retrieved 28 October 2015.
  47. Cook, Brent (4 March 2015). "LibreSSL 2.1.4 released". openbsd-announce (Mailing list). Retrieved 28 October 2015.
  48. Cook, Brent (17 March 2015). "LibreSSL 2.1.5 released". openbsd-announce (Mailing list). Retrieved 28 October 2015.
  49. Cook, Brent (19 March 2015). "LibreSSL 2.1.6 released". openbsd-announce (Mailing list). Retrieved 28 October 2015.
  50. Cook, Brent (11 June 2015). "LibreSSL 2.1.7 and 2.2.0 released". openbsd-announce (Mailing list). Retrieved 28 October 2015.
  51. 51.0 51.1 Cook, Brent (9 July 2015). "LibreSSL 2.2.1 released". openbsd-announce (Mailing list). Retrieved 28 October 2015.
  52. 52.0 52.1 Cook, Brent (6 August 2015). "LibreSSL 2.2.2 released". openbsd-announce (Mailing list). Retrieved 28 October 2015.
  53. Beck, Bob (16 October 2014). "LibreSSL 2.1.1 released". openbsd-tech (Mailing list).
  54. "OpenBSD LibreSSL CVS OPENSSL_NO_HEARTBEATS". http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libssl/src/ssl/d1_both.c.diff?r1=1.6&r2=1.7. 
  55. Miod Vallat. "Remove support for big-endian i386 and amd64". openbsd-cvs (Mailing list).
  56. Perlroth, Nicole (10 September 2013). "Government Announces Steps to Restore Confidence on Encryption Standards". The New York Times. http://bits.blogs.nytimes.com/2013/09/10/government-announces-steps-to-restore-confidence-on-encryption-standards/. 
  57. "The future (or lack thereof) of LibreSSL's FIPS Object Module". http://opensslrampage.org/post/83555615721/the-future-or-lack-thereof-of-libressls-fips. 
  58. Beck, Bob (3 August 2014). "LibreSSL 2.0.4 released". openbsd-announce (Mailing list). Retrieved 28 October 2015.
  59. Vallat, Miod (10 November 2014). "Re: CVS: cvs.openbsd.org: src". openbsd-cvs (Mailing list). Retrieved 28 October 2015.

External links