先週辺りから巷を騒がせ始めているHeartbleed。
使用中のサーバもHeartbleedの脆弱性のあるバージョンであった為、アップデートを行いました。
使用環境:CentOS6.4 64bit
参考: http://d.hatena.ne.jp/nekoruri/20140408/heartbleed
ちなみに脆弱性があるかは以下のサイトでチェック。
SSL Toolbox
「Your server is vulnerable to Heartbleed attack.」と出ていれば、脆弱性のあるバージョンとのこと。
ついでに、ターミナル上でのバージョンをチェック。
# rpm -q openssl openssl-1.0.1e-16.el6_5.1.x86_64
参考サイト内によると、CentOS(6.5ですが)では、openssl-1.0.1e-16.el6_5.7 で修正とのことなので、これはアウト。
パッケージ管理はyumを使用していたので、yumのリポジトリに修正済バージョンがあるかチェック。
# yum info openssl
Installed Packages
Name : openssl
Arch : x86_64
Version : 1.0.1e
Release : 16.el6_5.1
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.7
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.7
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.
あったのでOK、ということでアップデートを実施。
# yum update openssl ================================================================================ Package Arch Version Repository Size ================================================================================ Updating: openssl x86_64 1.0.1e-16.el6_5.7 updates 1.5 M Updating for dependencies: openssl-devel x86_64 1.0.1e-16.el6_5.7 updates 1.2 M Transaction Summary ================================================================================ Upgrade 2 Package(s) Total download size: 2.7 M Is this ok [y/N]: ~ Updated: openssl.x86_64 0:1.0.1e-16.el6_5.7 Dependency Updated: openssl-devel.x86_64 0:1.0.1e-16.el6_5.7 Complete!
念のためバージョンを確認
# yum info openssl
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.
その後、使用中サービスを再起動。
今回はapacheのみだったのでapacheを再起動。
(OS自体を再起動したほうがいいという話もあり)
「Your server is not vulnerable to Heartbleed attack.」に表記が変わればOK。
「not」がつくかつかないか、なのですが、強調もないので正直分かりづらい……。
そして、可能であれば、秘密鍵の再生成。
これでひとまず大丈夫、なのだろうか。

