問題描述
我已按照安裝 unattended-upgrades 的說明在我的服務器(ubuntu 服務器 13.10)上安裝自動安全更新。
https://help.ubuntu.com/community/AutomaticSecurityUpdates
你能幫我理解為什麽今天早上我的服務器上仍然有心髒出血錯誤嗎?
$ openssl version -a
OpenSSL 1.0.1e 11 Feb 2013
built on: Wed Jan 8 20:58:47 UTC 2014
platform: debian-amd64
其他信息:
$ cat /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
$ cat /var/log/apt/history.log
....
Start-Date: 2014-04-03 15:33:59
Commandline: apt-get install nginx
Install: libxau6:amd64 (1.0.8-1, automatic), libx11-data:amd64 (1.6.1-1ubuntu1, automatic), libxcb1:amd64 (1.9.1-3ubuntu1, automatic), libvpx1:amd64 (1.2.0-2, automatic), libgd3:amd64 (2.1.0-2, automatic), libxdmcp6:amd64 (1.1.1-1, automatic), libxslt1.1:amd64 (1.1.28-2, automatic), nginx-common:amd64 (1.4.1-3ubuntu1.3, automatic), nginx:amd64 (1.4.1-3ubuntu1.3), nginx-full:amd64 (1.4.1-3ubuntu1.3, automatic), libx11-6:amd64 (1.6.1-1ubuntu1, automatic), libxpm4:amd64 (3.5.10-1, automatic)
End-Date: 2014-04-03 15:34:02
Start-Date: 2014-04-04 10:26:38
Commandline: apt-get install unattended-upgrades
Install: unattended-upgrades:amd64 (0.79.3ubuntu8)
End-Date: 2014-04-04 10:26:40
謝謝
最佳回答
您的服務器上沒有 Heartbleed 漏洞,OpenSSL 已修複此問題(無需升級)。
您在 OpenSSL 版本輸出中遺漏了幾行重要的行,這就是您知道它已被修補的方式,而不是版本號:
openssl version -a ✭
OpenSSL 1.0.1e 11 Feb 2013
built on: Mon Apr 7 20:33:19 UTC 2014
platform: debian-amd64
options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)
compiler: cc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DOPENSSL_NO_TLS1_2_CLIENT -DOPENSSL_MAX_TLS1_2_CIPHER_LENGTH=50 -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
OPENSSLDIR: "/usr/lib/ssl"
‘build on’ 線在這裏很重要,4 月 7 日或之後:你很好。否則:你有麻煩了。
更新,因為構建日期似乎並不好:
也許無人值守升級尚未運行,在我的服務器上,cron.daily 中的腳本配置為在 6:25 運行
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
此外,檢查 /etc/apt/apt.conf.d/10periodic 的內容並檢查是否安裝了安全更新:
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";
來源:https://help.ubuntu.com/lts/serverguide/automatic-updates.html
次佳回答
首先,您需要執行升級。 Unattended-upgrades 每天隻運行一次,距離修複發布不到 1 天(2014-04-07 格林威治標準時間 20:00 左右)。有趣的是,請確保您已升級到 libssl1.0.0
版本 1.0.1e-3ubuntu1.2 或更高版本。 (準確地說,該修複出現在 1.0.1-4ubuntu5.12 版本中。)
接下來,請注意這是一個非常嚴重的漏洞:它可能允許攻擊者通過連接到您的易受攻擊的服務器來獲取機密數據。如果您正在運行 SSL 服務器,那麽在漏洞公布前不久,服務器內存中的任何數據都可能已泄露。這尤其包括服務器的 SSL 私鑰,因此您應該生成一個新的並撤銷舊的。
有關詳細信息,請參閱 How to patch the Heartbleed bug (CVE-2014-0160) in OpenSSL?
第三種回答
您不能信任內部版本字符串。版本為 1.0.1e
,該錯誤影響從 1.0.0 到 1.0.0f。這足以確定您是否還有易受攻擊的 openssl 版本?不會。即使應用了一些更新,OpenSSL 內部版本也不會改變。可靠識別您的版本的唯一方法是使用 apt-cache policy
或其他工具查看包管理器版本:
➜ ~ apt-cache policy openssl
openssl:
Installed: 1.0.1f-1
Candidate: 1.0.1f-1
Version table:
*** 1.0.1f-1 0
500 http://http.debian.net/debian/ testing/main i386 Packages
100 /var/lib/dpkg/status
➜ ~ dpkg -l openssl
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii openssl 1.0.1f-1 i386 Secure Sockets Layer toolkit - cr
➜ ~
如您所見,我的 openssl 版本更好,似乎受到了影響,因為它是 1.0.1f,現在如果我檢查更改日誌:
➜ ~ apt-get changelog openssl
openssl (1.0.1f-1) unstable; urgency=high
* New upstream version
- Fix for TLS record tampering bug CVE-2013-4353
- Drop the snapshot patch
* update watch file to check for upstream signature and add upstream pgp key.
* Drop conflicts against openssh since we now on a released version again.
-- Kurt Roeckx <kurt@roeckx.be> Mon, 06 Jan 2014 18:50:54 +0100
是的,我仍然受到影響。更新日誌中沒有提及 CVE-2014-0160。但是,我沒有運行任何 SSL/TSL 服務,所以我可以等待。我隻是不必使用此版本的 OpenSSL 生成 SSL 證書。如果我這樣做了,我隻需要遵循 Gilles 的建議:取消服務,撤銷證書,生成新的。