[重要]再びOpenSSLにて脆弱性

OpenSSLの脆弱性を発見した方によればこの脆弱性はOpenSSLの初期リリース時から存在しており、16年間も発見されてこなかった
そのため、影響を受ける可能性があるバージョンはOpenSSL 0.9.8y以前と1.0.0~1.0.0l、1.0.1~1.0.1gに存在する
影響としては、本来暗号化されるはずの認証情報などの重要な情報を攻撃者によって詐取・改ざんを受ける恐れがある

4月に「Heartbleed」の脆弱性が発覚し、対応に追われたばかりなのに別の脆弱性が発覚してためシステム管理者は 対応に追われることとなる
前回同様、本脆弱性が悪用されたとしても形跡は残らないというので極めて深刻だ

対策としては、脆弱性が修正されたバージョンへのアップデートが必要

OpenSSL 0.9.8とそれ以前を使っている場合は0.9.8zaへ
OpenSSL 1.0.0を使っている場合は1.0.0mへ
OpenSSL 1.0.1を使っている場合は1.0.1hへアップデートが必要となる


さて、筆者のテスト環境での結果を見ていこう

RPMパッケージでインストールされているのでOpenSSLのバージョンを見てみよう

# rpm -qa | grep "openssl"
openssl-1.0.1e-16.el6_5.7.x86_64

脆弱性が修正されているバージョン※1は「1.0.1e-16.el6_5.14」※2なのでアップデートが必要
※1 CentOS6.5にて標準のyumリポジトリの場合
※2 1.0.1系は1.0.1hへと記載したが、1.0.1e-16.el6_5.14でも本脆弱性が修正されている

早速、yumコマンドにてアップデートが可能か確認する

# yum check-update | grep "openssl"
openssl.x86_64                               1.0.1e-16.el6_5.14          updates

アップデートすることは可能のようだ

アップデートの詳細を確認する
Releaseの部分が「16.el6_5.7」から「16.el6_5.14」へ変わる

# yum info openssl
Loaded plugins: downloadonly, fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.jaist.ac.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Installed Packages
Name        : openssl
Arch        : x86_64
Version     : 1.0.1e
Release     : 16.el6_5.7
Size        : 4.0 M
Repo        : installed
From repo   : updates
Summary     : A general purpose cryptography library with TLS implementation
URL         : http://www.openssl.org/
License     : OpenSSL
Description : The OpenSSL toolkit provides support for secure communications between
            : machines. OpenSSL includes a certificate management tool and shared
            : libraries which provide various cryptographic algorithms and
            : protocols.  
Available Packages
Name        : openssl
Arch        : i686
Version     : 1.0.1e
Release     : 16.el6_5.14
Size        : 1.5 M
Repo        : updates
Summary     : A general purpose cryptography library with TLS implementation
URL         : http://www.openssl.org/
License     : OpenSSL
Description : The OpenSSL toolkit provides support for secure communications between
            : machines. OpenSSL includes a certificate management tool and shared
            : libraries which provide various cryptographic algorithms and
            : protocols.  
Name        : openssl
Arch        : x86_64
Version     : 1.0.1e
Release     : 16.el6_5.14
Size        : 1.5 M
Repo        : updates
Summary     : A general purpose cryptography library with TLS implementation
URL         : http://www.openssl.org/
License     : OpenSSL
Description : The OpenSSL toolkit provides support for secure communications between
            : machines. OpenSSL includes a certificate management tool and shared
            : libraries which provide various cryptographic algorithms and
            : protocols.

ではアップデートを実施する
作業はいたって簡単以下のコマンドを打つだけだが1台ないし2台とかなら全然問題はないだろう
しかし、対象が何十台、何百台とあればシステム管理者には苦痛だ

# yum update openssl
Loaded plugins: downloadonly, fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.jaist.ac.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package openssl.x86_64 0:1.0.1e-16.el6_5.7 will be updated
---> Package openssl.x86_64 0:1.0.1e-16.el6_5.14 will be an update
--> Finished Dependency Resolution  
Dependencies Resolved  
==============================
 Package                      Arch                        Version                                  Repository                    Size
==============================
Updating:
 openssl                      x86_64                      1.0.1e-16.el6_5.14                       updates                      1.5 M  
Transaction Summary
==============================
Upgrade       1 Package(s)  
Total download size: 1.5 M
Is this ok [y/N]: y
Downloading Packages:
openssl-1.0.1e-16.el6_5.14.x86_64.rpm                                                                          | 1.5 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : openssl-1.0.1e-16.el6_5.14.x86_64                                                                                  1/2
  Cleanup    : openssl-1.0.1e-16.el6_5.7.x86_64                                                                                   2/2
  Verifying  : openssl-1.0.1e-16.el6_5.14.x86_64                                                                                  1/2
  Verifying  : openssl-1.0.1e-16.el6_5.7.x86_64                                                                                   2/2  
Updated:
  openssl.x86_64 0:1.0.1e-16.el6_5.14  
Complete!

アップデートは完了したら念のためバージョンを確認しておこう

# rpm -qa | grep "openssl"
openssl-1.0.1e-16.el6_5.14.x86_64

# yum info openssl
Loaded plugins: downloadonly, fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.jaist.ac.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Installed Packages
Name        : openssl
Arch        : x86_64
Version     : 1.0.1e
Release     : 16.el6_5.14
Size        : 4.0 M
Repo        : installed
From repo   : updates
Summary     : A general purpose cryptography library with TLS implementation
URL         : http://www.openssl.org/
License     : OpenSSL
Description : The OpenSSL toolkit provides support for secure communications between
            : machines. OpenSSL includes a certificate management tool and shared
            : libraries which provide various cryptographic algorithms and
            : protocols.  
Available Packages
Name        : openssl
Arch        : i686
Version     : 1.0.1e
Release     : 16.el6_5.14
Size        : 1.5 M
Repo        : updates
Summary     : A general purpose cryptography library with TLS implementation
URL         : http://www.openssl.org/
License     : OpenSSL
Description : The OpenSSL toolkit provides support for secure communications between
            : machines. OpenSSL includes a certificate management tool and shared
            : libraries which provide various cryptographic algorithms and
            : protocols.

脆弱性が修正された「1.0.1e-16.el6_5.14」なのでOK

あとは、OpenSSLを利用しているサービスの再起動を行いましょう
Apache、Postfix、Dovecot等など

手っ取り早いのはサーバ自体の再起動だが、サービス断が発生しますよね・・・

 

■参考URL
http://ccsinjection.lepidum.co.jp/blog/2014-06-05/CCS-Injection/index.html
https://rhn.redhat.com/errata/RHSA-2014-0625.html
http://qiita.com/yuba/items/12cbc1671ce15c489749
http://www.atmarkit.co.jp/ait/articles/1406/06/news037.html
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0224

 

■追伸 2014/06/11 08:42

どうしてもサーバの再起動が出来ない場合は以下のコマンドで表示されたプロセスを再起動しましょう。

# lsof -d DEL | fgrep -v -e /dev/zero -e /SYSV | grep "ssl"

このコマンドでアップデート前の古いOpenSSLのモジュールを読み込んでいるかがわかります。

 

 

Avatar photo

SNOWSKI

大阪にあるどこかのIT会社で働いております / もしかするとあなたのそばにいるかもね...