为什么无人值守升级不能修复 heartbleed 错误?

Gui*_*ent 20 upgrade openssl 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
Run Code Online (Sandbox Code Playgroud)

其他信息:

$ 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
Run Code Online (Sandbox Code Playgroud)

谢谢

Mat*_*don 28

您的服务器上没有 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"
Run Code Online (Sandbox Code Playgroud)

在 4 月 7 日或之后,“建立在”线上很重要:你很好。否则:你有麻烦了。

更新,因为构建日期似乎不太好:

也许无人值守升级还没有运行,在我的服务器上,cron.daily 中的脚本被配置为在 6:25 运行

25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
Run Code Online (Sandbox Code Playgroud)

另外,检查 /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";
Run Code Online (Sandbox Code Playgroud)

来源:https : //help.ubuntu.com/lts/serverguide/automatic-updates.html


Gil*_*il' 12

首先,您需要执行升级。无人值守升级每天仅运行一次,距离修复发布还不到 1 天(2014-04-07 格林威治标准时间 20:00 左右)。为了俏皮,请确保您已升级到libssl1.0.0版本 1.0.1e-3ubuntu1.2 或更高版本。(准确地说,该修复程序出现在 1.0.1-4ubuntu5.12 版本中。)

接下来,请注意这是一个非常糟糕的漏洞:它可能允许攻击者通过连接到您的易受攻击的服务器来获取机密数据。如果您正在运行 SSL 服务器,那么自漏洞公布前不久,服务器内存中的任何数据都可能已泄露。这尤其包括服务器的 SSL 私钥,因此您应该生成一个新的并撤销旧的。

有关更多信息,请参阅如何修补 OpenSSL 中的 Heartbleed 错误 (CVE-2014-0160)?


Bra*_*iam 7

您不能信任内部版本字符串。版本说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
?  ~  
Run Code Online (Sandbox Code Playgroud)

如您所见,我的 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
Run Code Online (Sandbox Code Playgroud)

是的,我仍然受到影响。更改日志中没有任何对 CVE-2014-0160 的引用。但是,我没有运行任何 SSL/TSL 服务,所以我可以等待。我只是不必使用此版本的 OpenSSL 生成 SSL 证书。如果我这样做了,我只需要遵循 Gilles 的建议:取消服务,撤销证书,生成新证书。