Resolution for OpenSSL CCS Injection Vulnerability (CVE-2014-0224) in Red Hat Enterprise Linux

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 4(ELS)

Issue

  • How to avoid impact to a Red Hat Enterprise Linux system from CVE-2014-0224?
  • How to know if a Red Hat Enterprise Linux system is vulnerable to CVE-2014-0224?
  • How to download and upgrade to the latest version of OpenSSL to make sure my system is not vulnerable to CVE-2014-0224 or Hearbleed?

Resolution

  • The exploit affects systems that are servers offering an OpenSSL connection, or clients connecting to vulnerable servers.

  • In order to avoid exploitation from CVE-2014-0224, ensure that your system is updated to at least the following versions of OpenSSL.

RHSA-2014:0679

  • Red Hat Enterprise Linux 7 - openssl-1.0.1e-34.el7_0.3

RHSA-2014:0625

  • Red Hat Enterprise Linux 6 - openssl-1.0.1e-16.el6_5.14

RHSA-2014:0624

  • Red Hat Enterprise Linux 5 - openssl-0.9.8e-27.el5_10.3

RHSA-2014:0680

  • Red Hat Enterprise Linux 7 - openssl098e-0.9.8e-29.el7_0.2

RHSA-2014:0626

  • Red Hat Enterprise Linux 5 - openssl097a-0.9.7a-12.el5_10.1
  • Red Hat Enterprise Linux 6 - openssl098e-0.9.8e-18.el6_5.2

RHSA-2014:0627

  • Red Hat Enterprise Linux 4 Extended Lifecycle Support - openssl-0.9.7a-43.22.el4
  • Red Hat Enterprise Linux 5.6 Long Life - openssl-0.9.8e-12.el5_6.12
  • Red Hat Enterprise Linux 5.9 Extended Update Support - openssl-0.9.8e-26.el5_9.4
  • Red Hat Enterprise Linux 6.2 Advanced Update Support - openssl-1.0.0-20.el6_2.7
  • Red Hat Enterprise Linux 6.3 Extended Update Support - openssl-1.0.0-25.el6_3.3
  • Red Hat Enterprise Linux 6.4 Extended Update Support - openssl-1.0.0-27.el6_4.4

  • In order to update to the most recent version of the OpenSSL package run the following command:

# yum update openssl
  • Specify the package name in order to update to a particular version of OpenSSL. For example, to update a Red Hat Enterprise Linux 6.5 system run:
# yum update openssl098e-0.9.8e-18.el6_5.2
  • The only way to fix it is to install updated OpenSSL packages and restart affected services.
  • The safest & simplest thing to do is to perform a system reboot.

  • Carry out the following operation if system cannot be reboot.

/sbin/ldconfig

Root Cause

  • It was found that OpenSSL clients and servers could be forced, via a specially crafted handshake packet, to use weak keying material for communication. A man-in-the-middle attacker could use this flaw to decrypt and modify traffic between a client and a server.

  • For more information about this Vulnerability, refer to the following article:
    OpenSSL CCS Injection Vulnerability (CVE-2014-0224) Alert

Diagnostic Steps

  • To determine if a system is affected by this vulnerability, review the version of OpenSSL:
# rpm -qa openssl

Additionally, Red Hat Access Labs has released the CCS Injection Detector to help validate if your systems have been patched against this vulnerability.

Note: This vulnerability cannot be used to extract server or client side key material. This means that existing signed certificates do not need replacement once software is updated.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

28 Comments

I wonder why I am not yet seeing the new openssl package (on RHEL 6.5):

rpm -qa openssl
openssl-1.0.1e-16.el6_5.7.x86_64

yum check-update openssl
Loaded plugins: changelog, dellsysid, downloadonly, rhnplugin
This system is receiving updates from RHN Classic or RHN Satellite.

I can't say for certain however it would seem you are updating from a Satellite server and if that Satellite instance hasn't been updated then you won't see it.

Hi Craig, I know we don't use Stellite server; just pull it from Redhat's rhel server repos. May be that's not updated yet?

I checked two of my server, same issue (RHEL 6.5). May be I should try later.

Needed yum clean all. Now I see it.
um check-update openssl
Loaded plugins: changelog, dellsysid, downloadonly, rhnplugin
This system is receiving updates from RHN Classic or RHN Satellite.
openssl.x86_64 1.0.1e 16.el6_5.14 rhel-x86_64-server-6
Sorry for the noise.

Is there way to know exactly which versions of openssl has been effected without doing detection test? Or all openssl packages need to be upgraded to latest version?

Hi, this might help?: https://www.openssl.org/news/secadv_20140605.txt

The two links in the "Issue" section should really point to Red Hat's CVE response here --> https://access.redhat.com/security/cve/CVE-2014-0224. As I type this, the two links in the 'Issue Section" above point back to this page you are reading right now.

Remmele,

Thanks so much. We've adjusted the page and really appreciate you helping us catch that!

Gladly :)

I was at version OpenSSL 0.9.8e-fips-rhel5 used "yum update openssl" to update that. Update finished successfully and I can display the new installed package with "rpm -qa openssl" and get the following:
openssl-0.9.8e-27.el5_10.3
openssl-0.9.8e-27.el5_10.3

However, after testing it with the CCS injector detection it fails. It also shows the OLD version with the "openssl version" command? Thanks for the help.

Check your application's configuration to find application is using openssl at a different location, and also do 'which openssl' before you run "openssl version", to find, its location. May also check PATH for application user.

Thanks Dawn for responding. The PATH for the openssl is /usr/bin.
/usr/bin shows the following:

-rwxr-xr-x 1 root root 369616 Jun 3 02:33 openssl

That tells me it is updated.

However, the following command still produces the OLD result:

/usr/bin/openssl version

OpenSSL 0.9.8e-fips-rhel5

Thanks again.

do 'openssl version -a' and check if 'built on' date differes from the old one.

If your application still fails the test, check if you have restarted the application after installing OpenSSL.

What are you referring to when you say "application"? Thanks!

Oh, sorry I forgot to mention that the date for the BUILD is June 3, 2014 which should be the date they updated the package however, the version still shows the OLD version:

OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
built on: Tue Jun 3 03:30:46 EDT 2014
platform: linux-x86_64
options: bn(64,64) md2(int) rc4(ptr,int) des(idx,cisc,16,int) blowfish(ptr2)
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DKRB5_MIT -I/usr/kerberos/include -DL_ENDIAN -DTERMIO -Wall -DMD32_REG_T=int -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wa,--noexecstack -DOPENSSL_USE_NEW_FUNCTIONS -fno-strict-aliasing -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM
OPENSSLDIR: "/etc/pki/tls"
engines: dynamic

Thanks Dawn. I think I resolved the issue. I rebooted the machine and it resoved the issue? Thanks!

Bahram

Updated to latest version, "CCS Injection Detector" still shows SMTP servers (25/tcp, TLS) as vulnerable.

SMTP servers are expected to use non-SSL plain text SMTP protocol over port 25, and only switch to using encryption after SMTP STARTTLS command. Detector script has no support for STARTLS and should be expected to report incorrect results for any service that requires protocol-specific communication to switch plain text communication to SSL/TLS encrypted.

Good question and thanks for the useful answer Tomas. I was wondering about that too, for port 143 which probably has same behaviour as port 25 (while doing STARTTLS)

Got server response, size: 54
Got server response, size: 138
Got server response, size: 51
- Handshake - unknown (65)
FAIL Remote host is affected

ports 993 and 995 correctly passed the test after patching/restarting services.

The test script should be expected to not work correctly for any service that uses some form of starttls. Besides mentioned smtp and imap, also pop3, ftp, mysql, postgresql, ldap, and likely other.

Our server is still on RHEL4 and running the version openssl-0.9.7a-43.18.el4
The yum command doesn't work on RHEL4. When we try using up2date command, the latest openssl package cannot be retrieved. Any suggestions on how to get it done? Thank you

Updates for Red Hat Enterprise Linux 4 were released via the Extended Life Cycle Support Add-On, and are only available to customers with Extended Life Cycle Support Add-On subscription. You can find information about the add-on via the Red Hat Enterprise Linux Life Cycle page:

https://access.redhat.com/site/support/policy/updates/errata/#Extended_Life_Cycle_Phase

Is there for satellite users an easy way to check for such vulnerabilities in one place?

We used cloned channels to ensure a structured rollout of updates but the downside is that the "affected systems" tab shows only those systems subscribed to the base channel.
To identify all affected systems I had to clone the errata to all channels and then check the individual base and cloned errata to compile a complete list.
It would be great if the advanced search or something could be used to check all systems for a particular set of packages/versions (that doesn't work at the moment in RHNSS 5.5 I have an open support case for that).

Regards

Bram

CVE-2014-0224: 5th June 2014

An attacker can force the use of weak keying material in OpenSSL SSL/TLS clients and servers. This can be exploited by a Man-in-the-middle (MITM) attack where the attacker can decrypt and modify traffic from the attacked client and server. (original advisory). Reported by KIKUCHI Masashi (Lepidum Co. Ltd.).

Fixed in OpenSSL 1.0.1h (Affected 1.0.1g, 1.0.1f, 1.0.1e, 1.0.1d, 1.0.1c, 1.0.1b, 1.0.1a, 1.0.1)
Fixed in OpenSSL 1.0.0m (Affected 1.0.0l, 1.0.0k, 1.0.0j, 1.0.0i, 1.0.0g, 1.0.0f, 1.0.0e, 1.0.0d, 1.0.0c, 1.0.0b, 1.0.0a, 1.0.0)
Fixed in OpenSSL 0.9.8za (Affected 0.9.8y, 0.9.8x, 0.9.8w, 0.9.8v, 0.9.8u, 0.9.8t, 0.9.8s, 0.9.8r, 0.9.8q, 0.9.8p, 0.9.8o, 0.9.8n, 0.9.8m, 0.9.8l, 0.9.8k, 0.9.8j, 0.9.8i, 0.9.8h, 0.9.8g, 0.9.8f, 0.9.8e, 0.9.8d, 0.9.8c, 0.9.8b, 0.9.8a, 0.9.8)

RedHat recommend to update at the following version:
Red Hat Enterprise Linux 5 - openssl-0.9.8e-27.el5_10.3

Why not 0.9.8za?

This article is helpful to you why upstream version of openssl is different from Red Hat's

  • After an upstream project has released a newer version of a package when will the package on a Red Hat Enterprise Linux System be updated to this version?
    https://access.redhat.com/site/solutions/2074

So, openssl-0.9.8e-27.el5_10.3 is a backport of 0.9.8za?

Is posible download the package openssl-1.0.1e-16.el6_5.14.x86.64.rpm ?