Translated message

A translation of this page exists in English.

Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

对于 CVE-2014-6271 和 CVE-2014-7169 中发生的 Bash 通过特殊环境变量进行代码注入攻击的修复方案。

Solution In Progress - Updated -

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 4 (ELS)

Issue

Resolution

所有使用Bash shell来解析环境变量的值的软件都会受到这个问题的影响。一个应用可以通过许多方法来调用Bash,因此这个问题对于整个环境来说危险性非常高。如果某应用要执行一个二进制文件,Bash就会被调用。由于Bash shell的应用十分广泛,一旦遇到这种问题就会造成很大的影响,因此我们需谨慎对待!

为了避免CVE-2014-6271导致的问题,请确保您当前系统所使用的Bash已经至少升级到以下版本。

RHSA-2014:1293

  • Red Hat Enterprise Linux 7 - bash-4.2.45-5.el7_0.2
  • Red Hat Enterprise Linux 6 - bash-4.1.2-15.el6_5.1
  • Red Hat Enterprise Linux 5 - bash-3.2-33.el5.1

RHSA-2014:1294

  • Red Hat Enterprise Linux 4 Extended Lifecycle Support - bash-3.0-27.el4.2
  • Red Hat Enterprise Linux 5.6 Long Life - bash-3.2-24.el5_6.1
  • Red Hat Enterprise Linux 5.9 Extended Update Support - bash-3.2-32.el5_9.2
  • Red Hat Enterprise Linux 6.2 Advanced Update Support - bash-4.1.2-9.el6_2.1
  • Red Hat Enterprise Linux 6.4 Extended Update Support - bash-4.1.2-15.el6_4.1

RHSA-2014:1295

  • SJIS for Red Hat Enterprise Linux 6 - bash-4.1.2-15.el6_5.1.sjis.1
  • SJIS for Red Hat Enterprise Linux 5 - bash-3.2-33.el5_11.1.sjis.1

为了避免CVE-2014-7169导致的问题,请确保您当前系统所使用的Bash已经至少升级到以下版本,这些版本同样包含了以上问题的修复。

RHSA-2014:1306

  • Red Hat Enterprise Linux 7 - bash-4.2.45-5.el7_0.4
  • Red Hat Enterprise Linux 6 - bash-4.1.2-15.el6_5.2
  • Red Hat Enterprise Linux 5 - bash-3.2-33.el5_11.4

RHSA-2014:1311

  • Red Hat Enterprise Linux 4 Extended Lifecycle Support - bash-3.0-27.el4.4
  • Red Hat Enterprise Linux 5.6 Long Life - bash-3.2-24.el5_6.2
  • Red Hat Enterprise Linux 5.9 Extended Update Support - bash-3.2-32.el5_9.3
  • Red Hat Enterprise Linux 6.2 Advanced Update Support - bash-4.1.2-9.el6_2.2
  • Red Hat Enterprise Linux 6.4 Extended Update Support - bash-4.1.2-15.el6_4.2

RHSA-2014:1312

  • SJIS for Red Hat Enterprise Linux 6 - bash-4.1.2-15.el6_5.1.sjis.2
  • SJIS for Red Hat Enterprise Linux 5 - bash-3.2-33.el5_11.1.sjis.2

为了升级至最新版本的Bash升级包,请执行如下命令:

# yum update bash

在需要更新特定的版本包时,需要指定安装包的名称。例如,更新Red Hat Enterprise Linux 6.5 的bash安装包时,请执行:

# yum update bash-4.1.2-15.el6_5.2

Root Cause

  • Bash在以一个特殊的格式,将一个环境变量,传递至另一个环境变量时,会有一个安全漏洞。攻击者利用此漏洞,可以绕过或者无视环境变量的限制,执行shell命令。
    某些服务和应用程序,允许向未经身份验证的远程连接者提供环境变量,以至于他们能利用此漏洞。

  • 有关此漏洞的更多信息,请参阅以下文章:
    Bash Code Injection Vulnerability via Specially Crafted Environment Variables (CVE-2014-6271)

Diagnostic Steps

  • 可以通过查看Bash的版本,判断系统是否受此影响:
# rpm -qa bash

This solution has been reviewed for technical accuracy, optimized for search, and integrated with Product Documentation and/or Red Hat Access Labs. Much like when a software package is accepted upstream, this content has moved from the general KCS editing workflow into the responsibility of Customer Content Services as maintainers.

Comments