LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-16-2014, 04:42 PM   #1
mancha
Member
 
Registered: Aug 2012
Posts: 484

Rep: Reputation: Disabled
SSL 2.0 -- 1996 wants its broken protocol back


SSL 2.0 has been known to be unsafe for almost 20 years. In fact, this prompted Netscape to develop a completely redesigned
replacement protocol, SSL 3.0, which it released in early 1996.

Modern browsers don't support SSL 2.0 nor do most SSL/TLS libraries. OpenSSL might be the only major SSL/TLS library that still
supports the protocol by default (n.b. OpenSSL's default cipher list doesn't include any SSL 2.0 ciphers though many applications
set their own cipher lists). Mozilla's NSS also contains SSL 2.0 support in its code base but, since NSS 3.13, it is disabled by
default and is planned for complete removal in the near term.

Among the protocol's bigger problems:
  • The handshake is vulnerable to MiTM attacks
  • MAC construction is weak and relies on MD5
  • Weak export-grade ciphers weaken MACs
  • Same cryptographic key used for message authentication and encryption
  • TCP FIN is taken as EOD permitting truncation attacks
For these reasons, disabling SSL 2.0 is one of the OpenSSL recommendations I make in a security/vulnerability post (note: many
OSes such as Debian, Ubuntu, and OpenBSD build OpenSSL without SSL 2.0).

Caveat utilitor: before making the decision to switch to a non-SSLv2 OpenSSL, it is important to realize things can get a little
messy - Slackware packages that link OpenSSL SSLv2 functions will need to be rebuilt or, possibly, upgraded. A partial list
includes: neon, Python, M2Crypto, curl, php, qt, ruby, wget, fetchmail, stunnel, mailx, httpd.

However, the result is an OS purged of the possibility of unsafe SSL 2.0 usage (at least via OpenSSL).

--mancha

---------
Note: while re-building neon and Python against my SSLv2-less OpenSSL, I realized my personal OpenSSL slackbuild was incorrectly
disabling SSLv2 by defining the OPENSSL_NO_SSL2 macro rather than using "no-ssl2". This prevented the macro from getting defined
in one of OpenSSL's public headers and became an issue when rebuilding programs because they couldn't detect that SSLv2 wasn't
supported.

I mention this for those who are using my slackbuild (contained in openssl-20140605.tar.bz2). The new openssl-20140916.tar.bz2
provides a corrected slackbuild along with the latest OpenSSL source code of the relevant branches (i.e. 1.0.1i and 0.9.8zb).

Last edited by mancha; 09-20-2014 at 02:37 AM. Reason: Remove fork references
 
Old 09-16-2014, 06:19 PM   #2
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Rep: Reputation: 195Reputation: 195
Once again, thanks for your work.
 
Old 09-16-2014, 07:07 PM   #3
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I have libreSSL installed and I didn't have to rebuild any packages. Should I have ? All I did was make some symlinks and everything works.
 
Old 09-16-2014, 07:38 PM   #4
mancha
Member
 
Registered: Aug 2012
Posts: 484

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by metaschima View Post
I have libreSSL installed and I didn't have to rebuild any packages. Should I have ? All I did was make some symlinks and everything works.
Are you sure everything works?

Check libneon by compiling empty.c:

Code:
/* compile with gcc -o empty empty.c -lneon */
int main() {}
Check Python's ssl module with:

Code:
$ python
Python 2.7.5
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
You can fix neon with a re-build (after reading this post). Python will be a little trickier because re-building will only address the
SSL 2.0 issue. If you want to use it with LibreSSL you'll have to patch Python so it doesn't use RAND_egd.

--mancha

Last edited by mancha; 09-20-2014 at 12:38 AM. Reason: Remove bold; clarify the Python complication is related to LibreSSL (not OpenSSL w/o SSL 2.0)
 
4 members found this post helpful.
Old 09-16-2014, 07:47 PM   #5
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Ok, I guess those don't work. I guess I'll have to rebuild all packages just to be sure. Thanks.
 
Old 09-17-2014, 09:30 AM   #6
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278
Blog Entries: 7

Rep: Reputation: Disabled
stunnel needs upgrade to latest 5.03 due to stunnel: CVE-2013-1762 if you use samba.
 
Old 09-17-2014, 02:28 PM   #7
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
What about GNUTLS? I've heard it's actually not as strong as OpenSSL or LibreSSL.
 
Old 09-17-2014, 04:18 PM   #8
dunric
Member
 
Registered: Jul 2004
Distribution: Void Linux, former Slackware
Posts: 498

Rep: Reputation: 100Reputation: 100
Really good job, mancha. As always.
I'd like to see LibreSSL would completely replace OpenSSL in some of the future Slackware releases.
Here is a partial list of applications and libs Gentoo folks tested for LibreSSL's compatibility. I could add nginx server which seems to work after a decent patch applied.
 
Old 09-17-2014, 08:09 PM   #9
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I couldn't rebuild everything, it's too much. I rebuild as much as I could and created the symlink for the rest to work.
 
Old 09-22-2014, 04:31 PM   #10
mancha
Member
 
Registered: Aug 2012
Posts: 484

Original Poster
Rep: Reputation: Disabled
My original post shouldn't be mistaken as a criticism of OpenSSL. Rather, its purpose is to raise awareness about insecure configurations.
But, OpenSSL chooses to support the broken SSL 2.0. Isn't that on them?
OpenSSL has numerous support commitments. Among those, embedded clients that only speak SSL 2.0 (ergo the support). However, I do
think they could flip the logic so SSL 2.0 has to be explicitly enabled (not disabled). Oh, and the bike shed should be blue.

Quote:
Originally Posted by ReaperX7 View Post
What about GNUTLS? I've heard it's actually not as strong as OpenSSL or LibreSSL.
GnuTLS is a feature-rich and mature SSL/TLS tookit that, unlike OpenSSL and LibreSSL, is pretty much a one-man-operation (at least
lately). However, it's not always easy to tell it's developed by a skeleton crew because of its dynamic development process with Nikos
continually expanding the feature set and promptly addressing vulnerabilities as they're identified.

I'm not going to recommend one library over another or get into their relative strengths and weaknesses. Suffice it to say, the
ecosystem is large enough for OpenSSL (and forks such as LibreSSL and BoringSSL) and other mature SSL/TLS suites like GnuTLS. In
fact, the added choice and potential for cross-pollination between projects means we all benefit.

Quote:
Originally Posted by number22 View Post
stunnel needs upgrade to latest 5.03 due to stunnel: CVE-2013-1762 if you use samba.
Many thanks for that reminder. I brought this up back in a February post but it's good you bring it up now because it's one of the
packages that require re-building after installing an OpenSSL without SSL 2.0.

Quote:
Originally Posted by dunric View Post
Here is a partial list of applications and libs Gentoo folks tested for LibreSSL's compatibility.
That's a great resource - thanks! The good folks at Gentoo have a long tradition of quality documentation and this is one more example.

--mancha

Last edited by mancha; 10-06-2014 at 04:13 PM. Reason: unclear sentence
 
  


Reply

Tags
openssl, security recommendations, slackware, ssl



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ssl 3.0 / tls 1.0 open source protocol stack download link fahad.anwar Linux - Newbie 2 05-22-2012 02:08 AM
SSL_read error due of a SSL protocol violation salimshahzad Linux - Newbie 1 01-19-2011 06:45 PM
Broken SSL certificate on install mikieboy Ubuntu 1 06-02-2008 06:22 AM
Fastest protocol, SSH, SSHFS, VPN, TLS/SSL Akonbobot Linux - Security 4 05-12-2007 08:20 PM
STARTTLS server: SSL routines: SSL23_GET_CLIENT_HELLO: unknown protocol: s23_srvr.c:5 bennyhll Linux - Server 1 04-02-2007 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration