CentOS修複“OpenSSL Heartbleed漏洞”方法

來源:互聯網
上載者:User

OpenSSL官方發布的公告,出現問題的版本是:
Only 1.0.1 and 1.0.2-beta releases of OpenSSL are affected including
1.0.1f and 1.0.2-beta1.



下面針對這幾點分別做說明,並在下文給出解決方案:

CentOS,預設安裝的OpenSSL不在OpenSSL官方公告有安全性漏洞的範圍裡,預設安裝OpenSSL -1.0.0-20.el6_2.5.x86_64
但是如果使用者手工升級到1.0.1版本,有可能升級為有問題的版本。
目前雲平台軟體源已經同步了修複版本,可執行yum update openssl更新到最新版。

在系統上可查看相關資訊
# rpm -q --changelog openssl-1.0.1e | grep CVE-2014-0160
- fix CVE-2014-0160 - information disclosure in TLS
這個表示已經修複了漏洞.

2)Ubuntu 12.4
ubuntu和centos類似,預設安裝的版本是安全的,如果有不慎升級到漏洞版本,需要再次升級.
預設版本是libssl1.0.0,如果升級可以執行
使用者可執行
apt-get update
apt-get install libssl1.0.0或者apt-get upgrade(這將升級所有已安裝的包,謹慎操作)

驗證本機安裝的版本
root@VM-40-221-ubuntu:/etc/apt# dpkg -l|grep libssl
ii libssl1.0.01.0.1-4ubuntu5.12 SSL shared libraries
root@VM-40-199-ubuntu:~# dpkg -s libssl1.0.0|grep ^Version
Version:1.0.1-4ubuntu5.12
參考ubuntu官方關於此漏洞的說明
http://www.ubuntu.com/usn/usn-2165-1/

3)SuSE
使用OpenSSL 0.9.8a不存在安全問題.
4)使用者自行編譯的版本
這種情況下,使用者需要根據OpenSSL官方建議,重新編譯.
Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately
upgrade can alternatively recompile OpenSSL with -DOPENSSL_NO_HEARTBEATS.

解決方案
雲平台提供給開發商的虛擬機器預設是安全的,如果使用者不慎安裝帶漏洞的OpenSSL版本,需要自行升級,雲平台的下載源已經提供了最新版本的安裝包。
各OS升級方法方法如下:
1)SuSE該機器上的OpenSSL不需要升級
2)CentOS原生版,6.2/6.3;預設是安全的,如果安裝有帶漏洞版本,需要再升級一次到最新版本
yum install openssl
確認方法:
# rpm -q --changelog openssl-1.0.1e | grep CVE-2014-0160
- fix CVE-2014-0160 - information disclosure in TLS
3)Ubuntu12.4預設是安全的,如果安裝有帶漏洞的版本, ,需要再升級一次到最新版本
apt-get update
apt-get install libssl1.0.0
確認方法:
root@VM-40-199-ubuntu:~# dpkg -s libssl1.0.0|grep ^Version
Version:1.0.1-4ubuntu5.12
4)如果使用者是自行編譯的OpenSSL,請參考OpenSSL官方公告的方法重新編譯
Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately
upgrade can alternatively recompile OpenSSL with -DOPENSSL_NO_HEARTBEATS.

解決方案二:

yum search openssl

#返回Updating:openssl x86_64 1.0.1e-16.el6_5.7 updates 1.5 MUpdating for dependencies:openssl-devel x86_64 1.0.1e-16.el6_5.7 updates 1.2 M看起來版本還是比較新的,遂直接yum install openssl#然後重啟nginx/etc/init.d/nginx restart#測試漏洞已修複本來想源碼編譯安裝的,因為以上過程便已修複,就沒編譯,如果yum方法不行,嘗試以下安裝:wget http://www.openssl.org/source/openssl-1.0.1g.tar.gzcd openssl-1.0.1g./configmake && make install/etc/init.d/nginx restart #重啟nginx

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.