This is an old revision of the document!


LibreSSL is a fork of OpenSSL created by OpenBSD. There is also a portable version which is available in the ports tree: security/libressl.

LibreSSL has removed a number of OpenSSL features which can result in build issues for software that relies on them.

LibreSSL also has functionality that is not available in other ssl libraries on FreeBSD

Much of the detail in the original article has now been split into multiple sub-pages

How to use LibreSSL

The OpenBSD project has multiple branches of LibreSSL. This chapter describes how the upstream project and the FreeBSD ports correlate.

Work in progress

The ports are currently being refactored to reflect what's in this chapter

Not to be confused with FreeBSD's -STABLE

The stable versions correspond to a version of OpenBSD (planned versions/dates in parentheses)

LibreSSL version OpenBSD version Branched Release End-of-support
2.0.(5) 5.6 2014-07-12 2014-11-01 2015-11-01
2.1.(5) 5.7 2014-10-13 2015-05-01 2016-05-01
2.2.(2) (5.8) 2015-06-11 (2015-11-01) (2016-11-01)
2.3.x (5.9) 2015-09-23 (2016-05-01) (2017-05-01)

OpenBSD releases happen every 6 months and the project will provide updates for stable versions for one year after release of the corresponding OpenBSD version. With the release of the next OpenBSD version, the ABI will remain stable and the major shared library versions do not change.

These are point versions for the next OpenBSD release. Up to the release of the corresponding OpenBSD version, the ABI and major shared library version keep changing. The snapshot version contains features that are not found in the stable version. To use the latest LibreSSL features, this is the branch to follow.

The snapshots are considered to be secure just like the stable versions

To stay in line with the upstream OpenBSD project, the ports tree will (as of version 2.2/2.3) contain the stable version and the next/snapshot version for early adopters.

Date stable devel
2015-11-01 2.2 2.3
2016-05-01 2.3 2.4

As OpenBSD releases their next version of LibreSSL-Portable, the libressl-devel port will link to that next-stable version and you must rebuild all your ports.

The standard packages from FreeBSD are still being built with OpenSSL from base and for some packages requiring a newer OpenSSL with OpenSSL from ports.

The following FreeBSD derivatives are known to use LibreSSL

  1. PC-BSD by default since PC-BSD 10.1.21)
  2. OPNsense available since OPNsense 15.72)

To build ports against LibreSSL, add the following lines to /etc/make.conf

# Build ports against security/libressl
WITH_OPENSSL_PORT=	yes
OPENSSL_PORT=		security/libressl

Most ports will build without issue, some need fixing. See following paragraphs for the most notable.

If you require the latest features LibreSSL provides or wish to use the previous stable version, use the following in /etc/make.conf

WITH_OPENSSL_PORT=	yes
# Use the latest release with frequently changing API
OPENSSL_PORT=		security/libressl-devel

After switching this will most likely hit you.

  • GSS-API: If you need this you must select one of the ports implementations, you cannot combine ports Open-/LibreSSL with base GSS-API
  • Secure Remote Password (TLS-SRP): Must be disabled

As of python27-2.7.10 and python34-3.4.3 Python has included fixes for LibreSSL.
Python 3.2 and 3.3 have not been fixed yet but you can find patches in this section

Currently there's no solution available to create a FreeBSD installation where LibreSSL replaces the default OpenSSL libraries. Work is undergoing to see if this is viable.

security/p5-openxpi: Claimed to not be fully functional by the developers
security/py-cryptography: Claimed to not be fully functional by the developers

When you build world when you have LibreSSL installed, some base utilities will link to LibreSSL. These you will have to update every time there are shared library versions are bumped

History

Version Release days libssl/crypto/tls
2.0.0 12 Jul 2014 1 27/30/-
2.0.1 13 Jul 2014 3 27/30/-
2.0.2 16 Jul 2014 6 27/30/-
2.0.3 22 Jul 2014 12 27/30/-
2.0.4 03 Aug 2014 14 27/30/-
2.0.5 17 Aug 2014 57 27/30/-
2.1.0 13 Oct 2014 4 27/30/-
2.1.1 17 Oct 2014 60 29/30/-
2.1.2 16 Dec 2014 37 29/30/-
2.1.3 22 Jan 2015 40 30/30/-
2.1.4 04 Mar 2015 41 32/32/-
2.1.5 17 Mar 2015 13 32/32/3
2.1.6 19 Mar 2015 2 32/32/3
2.2.0 11 Jun 2015 84 32/33/3
2.2.1 08 Jul 2015 27 33/34/4
2.2.2 06 Aug 2015 29 35/35/6
2.2.3 29 Aug 2015 23 35/35/6
2.3.0 23 Sep 2015 29 36/37/9

The detailed version history was moved to the LibreSSL history sub-page

Ports

Detailed information on specific ports can now be found in the sub-page

The first build of all ports with LibreSSL for PC-BSD revealed 81 ports which require patching to work properly.

The build of all ports with LibreSSL 2.3, which has removed SSLv3, revealed 92 ports which require patching to work. This has been captured in the OpenSSL section as this fallout is considered equal to the fallout of building all ports with OpenSSL with SSLv3 disabled (security_openssl_UNSET=SSL3 / –no-ssl3).

Note: Counts are not up-to-date

Problem Description Count PRs Unsolved
Open Closed
EGD uses RAND_egd methods that no longer exist in LibreSSL 32 12 16 0
DES Uses deprecated des_ methods (replaced by DES_ methods) 19 4 15 0
SSLv2 Uses SSLv2 methods that no longer exist in LibreSSL 5 2 3 0
COMP Wants SSL compression 10 7 4 1
arc4rand conflict in FreeBSD/LibreSSL libs 3 0 0 3
CMS Uses deprecated S/MIME methods 2 0 2 0
GOST Uses removed GOST methods 2 0 2 0
PSK Uses PSK methods 3 1 0 2
SSLv3 Uses SSLv3 methods that no longer exist in LibreSSL 2.3 73 10 0 5
SHA-0 Uses SHA-0 methods 7 0 0 4
Other Other issues 34 2 13 8
TOTAL 186 30 51 33

The net-p2p/bitcoin and other virtual currency applications will/can not be fixed, they require bug-compatible OpenSSL libaries.

You can find examples of fixes in this GitHub repo, cross-reference with the PC-BSD 10.1.2 ports build chapter of the Ports sub-page.

Specific guidance for fixing the problems in the table above can be found here

LibreSSL (and OpenSSL) Security Vulnerabilities

Advisories prior to the initial release of LibreSSL (portable) are not included.

Severity LibreSSL OpenSSL
High 0 5
Medium* 15 28
Low 7 10
Total 19 36

* NVD Medium + OpenSSL Moderate

LibreSSL PRNG found to be unsafe. LibreSSL refers to this as the 'Linux forking and PID wrap issue'.

This was fixed in 2.0.2

CVE reference Description Severity Comment
Linux forking and PID wrap issue low Fixed in 2.0.2

No official rating, rated low for the counts above

OpenSSL published 9 vulnerabilities

CVE reference Description Severity Comment
CVE-2014-3510 Flaw handling DTLS anonymous EC(DH) ciphersuites medium
CVE-2014-3508 Information leak in pretty printing functions medium partially vulnerable
CVE-2014-3509 Race condition in ssl_parse_serverhello_tlsext medium
CVE-2014-3505 Double Free when processing DTLS packets medium
CVE-2014-3506 DTLS memory exhaustion medium
CVE-2014-3507 DTLS memory leak from zero-length fragments medium
CVE-2014-3511 OpenSSL TLS protocol downgrade attack medium
CVE-2014-5139 Crash with SRP ciphersuite in Server Hello message medium Not vulnerable
CVE-2014-3512 SRP buffer overrun high Not vulnerable

OpenSSL responds to the POODLE attack and published 4 vulerabilities

NB: As of this advisory, OpenSSL includes severity ratings to vulnerabilities

CVE reference Description Severity Comment
SSL 3.0 Fallback protection medium LibreSSL disabled SSLv3
Adds TLS_SCSV_FALLBACK in 2.1.4
CVE-2014-3568 Build option no-ssl3 is incomplete low
CVE-2014-3513 SRTP Memory Leak high Not vulnerable
CVE-2014-3567 Session Ticket Memory Leak medium Not vulnerable

OpenSSL published 8 vulerabilities

CVE reference Description Severity Comment
CVE-2014-8275 Certificate fingerprints can be modified low Fixed in 2.1.4
CVE-2014-3572 ECDHE silently downgrades to ECDH [Client] low Fixed in 2.1.4
CVE-2014-3570 Bignum squaring may produce incorrect results low Fixed in 2.1.4
CVE-2015-0205 DH client certificates accepted without verification [Server] low Fixed in 2.1.4
CVE-2015-0206 DTLS memory leak in dtls1_buffer_record moderate Fixed in earlier release
CVE-2014-3571 DTLS segmentation fault in dtls1_get_record moderate Not vulnerable
CVE-2014-3569 no-ssl3 configuration sets method to NULL low Not vulnerable
CVE-2015-0204 RSA silently downgrades to EXPORT_RSA [Client] low Not vulnerable

OpenSSL published 14 vulnerabilities and LibreSSL confirmed that it has 5 of these vulnerabilities as well, notably not CVE-2015-0297 which has the highest possible impact rating for OpenSSL.

CVE reference Description Severity Comment
CVE-2015-0286 Segmentation fault in ASN1_TYPE_cmp moderate
CVE-2015-0287 ASN.1 structure reuse memory corruption moderate
CVE-2015-0288 X509_to_X509_REQ NULL pointer deref moderate
CVE-2015-0289 PKCS7 NULL pointer dereferences moderate
CVE-2015-0209 Use After Free following d2i_ECPrivatekey error low Not vulnerable, fix merged
CVE-2015-0291 ClientHello sigalgs DoS high Affected code is not present
CVE-2015-0204 RSA silently downgrades to EXPORT_RSA [Client] high Fixed in LibreSSL 2.1.2
CVE-2015-0207 Segmentation fault in DTLSv1_listen moderate Not vulnerable
CVE-2015-0208 Segmentation fault for invalid PSS parameters moderate Affected code is not present
CVE-2015-0290 Multiblock corrupted pointer moderate Affected code is not present
CVE-2015-0292 Base64 decode moderate Fixed in LibreSSL 2.0.0
CVE-2015-0293 DoS via reachable assert in SSLv2 servers moderate Affected code is not present
CVE-2015-0285 Handshake with unseeded PRNG low Cannot happen by the design of the LibreSSL PRNG
CVE-2015-1787 Empty CKE with client auth and DHE moderate Fixed in LibreSSL 2.0.1

Links

  • LibreSSL is said to be not vulnerable to the high rated vulnerability CVE-2015-0208 that will be published 2015/03/19 by the author of the high rated vulnerability.

OpenSSL publishes 7 vulnerabilities. LibreSSL confirms that 3 of these vulnerabilities apply to LibreSSL as well and one is still under review.

CVE reference Description Severity Comment
CVE-2015-4000 DHE man-in-the-middle protection (Logjam) medium Not vulnerable
CVE-2015-1788 Malformed ECParameters causes infinite loop medium Fixed in 2.1.7/2.2.0
CVE-2015-1789 Exploitable out-of-bounds read in X509_cmp_time medium Fixed in 2.1.7/2.2.0
CVE-2015-1790 PKCS7 crash with missing EnvelopedContent medium Not vulnerable
CVE-2015-1792 CMS verify infinite loop with unknown hash function medium Fixed in 2.1.7/2.2.0
CVE-2015-1791 Race condition handling NewSessionTicket low In review
CVE-2014-8176 Invalid free in DTLS medium Not vulnerable

OpenSSL publishes a single vulnerability in the most recent versions of 1.0.1 and 1.0.2. Bob Beck announces that this vulnerability does not apply to LibreSSL.

CVE reference Description Severity Comment
CVE-2015-1793 Alternative chains certificate forgery high Not vulnerable

Qualys discovered a memory leak and a buffer overflow in LibreSSL when reviewing OpenSMTPD. Qualys Security Advisory

CVE reference Description Severity Comment
CVE-2015-5333 Memory leak in OBJ_obj2txt
CVE-2015-5334 Buffer overflow in OBJ_obj2txt

Links

Some more info


1)
PC-BSD® is a user friendly desktop Operating System based on FreeBSD
2)
OPNsense is an open source, easy-to-use and easy-to-build FreeBSD based firewall and routing platform.
  • libressl.1448736761.txt.gz
  • Last modified: 2015/11/28 18:52
  • by BernardSpil