您现在的位置:网站首页 > 公司动态 > 安全公告:GNU Bash 漏洞公告 (CVE-2014-6271, CVE-2014-7169)

安全公告:GNU Bash 漏洞公告 (CVE-2014-6271, CVE-2014-7169)


发布日期:2014-09-24

CVE ID:CVE-2014-6271,CVE-2014-7169

漏洞描述:

CVE-2014-6271:

攻击者可构造特殊的环境变量值,以在这些环境变量的值中包含特定的代码,当 Shell 对这些环境变量求值时,这些特定的代码将得以在系统中执行。某些服务和应用接受未经身份者提供的环境变量,因此攻击者可利用此漏洞源于在提供这些服务和应用的系统上执行任意的 Shell 命令。

CVE-2014-7169:

因 GNU Bash 允许在环境变量的值中的函数定义,及在函数定义后加入额外的字符串,攻击者可利用此特性在远程写入文件或执行其他可以影响到系统的操作。

以上两漏洞可能会影响到使用 ForceCommand 功能的 OpenSSH sshd; 使用 mod_cgi 或 mod_cgid 的 Apache 服务器; 调用 Shell 配置系统的 DHCP 客户端; 及其他使用 bash 作为解释器的应用等。

注:
1) CVE-2014-7169 的存在是因 CVE-2014-6271 的 Patch 不完整。
2) 关于以上两漏洞的更多详情请见 [1], [2], [3]

问题诊断:

如何确定当前 bash 版本是否有漏洞

$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"

若输出以下内容

vulnerable
this is a test

则证明系统当前的 Bash 版本存在漏洞。

若输出如下

$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test

则证明当前的 Bash 已为漏洞修复版本

各系统修补方式:


centos: 
yum -y update bash 
 
ubuntu: 
14.04 64bit 
wget http://mirrors.aliyun.com/fix_stuff/bash_4.3-7ubuntu1.1_amd64.deb && dpkg -i bash_4.3-7ubuntu1.1_amd64.deb 
 
14.04 32bit 
wget http://mirrors.aliyun.com/fix_stuff/bash_4.3-7ubuntu1.1_i386.deb && dpkg -i  bash_4.3-7ubuntu1.1_i386.deb 
 
 
12.04 64bit 
wget http://mirrors.aliyun.com/fix_stuff/bash_4.2-2ubuntu2.2_amd64.deb && dpkg -i  bash_4.2-2ubuntu2.2_amd64.deb 
 
12.04 32bit 
wget http://mirrors.aliyun.com/fix_stuff/bash_4.2-2ubuntu2.2_i386.deb && dpkg -i  bash_4.2-2ubuntu2.2_i386.deb 
 
10.× 64bit 
wget http://mirrors.aliyun.com/fix_stuff/bash_4.1-2ubuntu3.1_amd64.deb && dpkg -i bash_4.1-2ubuntu3.1_amd64.deb 
 
10.× 32bit 
wget http://mirrors.aliyun.com/fix_stuff/bash_4.1-2ubuntu3.1_i386.deb && dpkg -i bash_4.1-2ubuntu3.1_i386.deb 
 
 
debian: 
7.5 64bit && 32bit 
apt-get -y install --only-upgrade bash 
 
6.0.x 64bit 
wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3%2bdeb6u1_amd64.deb &&  dpkg -i bash_4.1-3+deb6u1_amd64.deb 
 
6.0.x 32bit 
wget http://mirrors.aliyun.com/debian/pool/main/b/bash/bash_4.1-3%2bdeb6u1_i386.deb &&  dpkg -i bash_4.1-3+deb6u1_i386.deb 
 
opensuse: 
13.1 64bit 
wget http://mirrors.aliyun.com/fix_stuff/bash-4.2-68.4.1.x86_64.rpm && rpm -Uvh bash-4.2-68.4.1.x86_64.rpm 
 
 
13.1 32bit 
wget http://mirrors.aliyun.com/fix_stuff/bash-4.2-68.4.1.i586.rpm && rpm -Uvh bash-4.2-68.4.1.i586.rpm 
 
aliyun linux: 
5.x 64bit 
wget http://mirrors.aliyun.com/centos/5/updates/x86_64/RPMS/bash-3.2-33.el5.1.x86_64.rpm && rpm -Uvh bash-3.2-33.el5.1.x86_64.rpm 
 
5.x 32bit 
wget http://mirrors.aliyun.com/centos/5/updates/i386/RPMS/bash-3.2-33.el5.1.i386.rpm && rpm -Uvh bash-3.2-33.el5.1.i386.rpm


例如,假设你的系统当前的 Bash 版本为 3.0。则相应的 patch 可通过以下链接获得:

http://ftp.gnu.org/gnu/bash/bash-3.0-patches/




【修补完成测试】
升级bash后,执行测试:
 $ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
 bash: warning: x: ignoring function definition attempt
 bash: error importing function definition for `x'
 this is a test


如果显示如上,表示已经修补了漏洞。


免费拨打  400-100-3886
免费拨打  400-100-3886 免费拨打 400-100-3886
在线客服
在线客服 24小时售后技术支持
返回顶部
返回顶部 返回顶部