Debianのwoody (3.0), sarge (3.1), etch (4.0), lenny (5.0)でbashの脆弱性問題に対応する手法

bashの脆弱性問題で、Debianで既にアップデートされないバージョンであるところの、woody (3.0), sarge (3.1), etch (4.0), lenny (5.0)に対して、簡単に対応する手法があるのか?というのを調べてみた。

Seewebというクラウドとホスティングをやっている会社にお勤めのDebianメンテナのMarco d’Itriさんが、会社の後援を受けて古いバージョン用の非公式debianパッケージを公開してくれています。
CVE-2014-6271 fix for Debian woody, sarge, etch and lenny

配布場所については、上記からたどってください。
(http://ftp.linux.it/pub/People/md/bash/ なんですが、Seeweb社の後援を受けて公開されていますので、敬意を表してここから配布場所への直リンクはしないでおきます)

どのバージョンのbashをダウンロードすればいいのかは、現在インストールされているパッケージのバージョンを調べてください。

olddebian:~# dpkg -l|grep bash
ii  bash                                                     3.2-4                    The GNU Bourne Again SHell
ii  bash-completion                                          20080705                   programmable completion for the bash shell
olddebian:~#

上記であれば、「bash」の「3.2-4」です。
配布場所のファイル一覧から「bash_3.2-4.???_amd64.deb」や「bash_3.2-4.???_i386.deb」のうち、数字が一番新しいものを探します。

2014/09/30 20:00現在だと「bash_3.2-4.2_amd64.deb」が最新でした。
これをwgetコマンドなどでダウンロードし、dpkg -iでインストールします。

手順としては、まずは、https://github.com/hannob/bashcheck/からbash脆弱性確認スクリプトを入手します。

olddebian:~# wget --no-check-certificate https://github.com/hannob/bashcheck/raw/master/bashcheck
<略>
olddebian:~# chmod a+x bashcheck
olddebian:~# ./bashcheck
Vulnerable to CVE-2014-6271 (original shellshock)
Vulnerable to CVE-2014-7169 (taviso bug)
./bashcheck: line 18: 20675 Segmentation fault      bash -c "true $(printf '<<EOF %.0s' {1..79})" 2> /dev/null
Vulnerable to CVE-2014-7186 (redir_stack bug)
Test for CVE-2014-7187 not reliable without address sanitizer
Variable function parser still active, likely vulnerable to yet unknown parser bugs like CVE-2014-6277 (lcamtuf bug)
olddebian:~#

脆弱性があることを確認したら、配布元のページから、debパッケージをダウンロードします。

「wget http://ftp.linux.it/pub/People/md/bash/bash_~.deb」という感じでダウンロードします。

ダウンロード後は、debパッケージを「dpkg -i」でインストールします。

olddebian:~# dpkg -i bash_3.2-4.2_i386.deb
(Reading database ... 19825 files and directories currently installed.)
Preparing to replace bash 3.2-4 (using bash_3.2-4.2_i386.deb) ...
Unpacking replacement bash ...
Setting up bash (3.2-4.2) ...
Processing triggers for man-db ...
olddebian:~#

インストール後、パッケージバージョンの確認と、脆弱性確認を行います。

olddebian:~# dpkg -l|grep bash
ii  bash                                                     3.2-4.2                    The GNU Bourne Again SHell
ii  bash-completion                                          20080705                   programmable completion for the bash shell
olddebian:~# ./bashcheck
Not vulnerable to CVE-2014-6271 (original shellshock)
Not vulnerable to CVE-2014-7169 (taviso bug)
Not vulnerable to CVE-2014-7186 (redir_stack bug)
Test for CVE-2014-7187 not reliable without address sanitizer
Variable function parser inactive, likely safe from unknown parser bugs
olddebian:~#

これで、現段階では、問題がなくなりました。


おまけ

squeeze(6.0)の場合、squeeze-ltsに切り替えることで対応できます。
「/etc/apt/sources.list」に以下を追加します。

deb http://http.debian.net/debian squeeze-lts main contrib non-free
deb-src http://http.debian.net/debian squeeze-lts main contrib non-free

そして、bashだけをアップデートしたいのであれば、以下を実行します。

root@olddebian:~# apt-get update
<略>
root@olddebian:~# apt-get install -t squeeze-lts --only-upgrade bash
<略>
root@olddebian:~# 

ネタ元:「How to only install security updates on debian」「bash vulnerability CVE-2014-6271 (Shellshock) fix on debian squeeze [duplicate]

RHEL6/CentOS6をOracle Linuxにしてみる

2020/09/28追記

Oracle公式のCentOSからの移行手順「Switch your CentOS systems to Oracle Linux」とRHELからサポートありのOracleLinuxへの移行手順「Switching from Red Hat Network (RHN) to Oracle Unbreakable Linux Network (ULN)

また、逆にRedHat公式によるCentOS/Oracle LinuxからRHELへの移行手順「How to convert from CentOS or Oracle Linux to RHEL

また、レポジトリによっては下記の様なメッセージが出るようになったようです。

IMPORTANT: A legacy Oracle Linux yum server repo file was found. Oracle Linux yum server repository configurations have changed which means public-yum-ol7.repo will no longer be updated. New repository configuration files have been installed but are disabled. To complete the transition, run this script as the root user:

/usr/bin/ol_yum_configure.sh

See https://yum.oracle.com/faq.html for more information.


Oracle Linux用にOpenStackがリリースされた、ということなので、Oracle Linuxの環境を用意してみようと思った。
つい先ほど、RHEL4/CentOS4でOralce Linuxにしてみたので、同じようにできるかな、と思ったらちょっと工夫が必要でした。
(注:手法としては、既知のディストリビューション乗り換え手法なんですけどね)

1. GPG Keyの入手

[root@centos6 ~]# wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
--2014-09-26 16:40:22--  http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
public-yum.oracle.com をDNSに問いあわせています... 203.179.83.11, 203.179.83.19
public-yum.oracle.com|203.179.83.11|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 1011 [text/plain]
`/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle' に保存中

100%[===================================================&amp;gt;] 1,011       --.-K/s 時間 0s

2014-09-26 16:40:22 (4.83 MB/s) - `/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle' へ保存完了 [1011/1011]

[root@centos6 ~]# 

2. yumレポジトリの編集
Oracle Linux用レポジトリの追加と、CentOS用レポジトリの削除

[root@centos6 ~]# cd /etc/yum.repos.d
[root@centos6 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo
--2014-09-26 16:40:45--  http://public-yum.oracle.com/public-yum-ol6.repo
public-yum.oracle.com をDNSに問いあわせています... 203.179.83.11, 203.179.83.19
public-yum.oracle.com|203.179.83.11|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 4233 (4.1K) [text/plain]
`public-yum-ol6.repo' に保存中

100%[===================================================&amp;gt;] 4,233       --.-K/s 時間 0s

2014-09-26 16:40:46 (323 MB/s) - `public-yum-ol6.repo' へ保存完了 [4233/4233]

[root@centos6 yum.repos.d]# ls
CentOS-Base.repo       CentOS-Media.repo  public-yum-ol6.repo
CentOS-Debuginfo.repo  CentOS-Vault.repo
[root@centos6 yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.disable
[root@centos6 yum.repos.d]# mv CentOS-Debuginfo.repo CentOS-Debuginfo.repo.disable
[root@centos6 yum.repos.d]# mv CentOS-Media.repo CentOS-Media.repo.disable
[root@centos6 yum.repos.d]# mv CentOS-Vault.repo CentOS-Vault.repo.disable
[root@centos6 yum.repos.d]#

で、アップデート実施

[root@centos6 yum.repos.d]# yum update -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Update Process
Resolving Dependencies
--&amp;gt; Running transaction check
---&amp;gt; Package audit.x86_64 0:2.2-2.el6 will be updated
<略>
Transaction Check Error:
  file /etc/issue from install of oraclelinux-release-6:6Server-5.0.2.x86_64 conflicts with file from package centos-release-6-4.el6.centos.10.x86_64
  file /etc/issue.net from install of oraclelinux-release-6:6Server-5.0.2.x86_64 conflicts with file from package centos-release-6-4.el6.centos.10.x86_64
  file /etc/redhat-release from install of oraclelinux-release-6:6Server-5.0.2.x86_64 conflicts with file from package centos-release-6-4.el6.centos.10.x86_64
  file /etc/rpm/macros.dist from install of oraclelinux-release-6:6Server-5.0.2.x86_64 conflicts with file from package centos-release-6-4.el6.centos.10.x86_64
  file /etc/system-release from install of oraclelinux-release-6:6Server-5.0.2.x86_64 conflicts with file from package centos-release-6-4.el6.centos.10.x86_64
  file /etc/system-release-cpe from install of oraclelinux-release-6:6Server-5.0.2.x86_64 conflicts with file from package centos-release-6-4.el6.centos.10.x86_64

Error Summary
-------------

[root@centos6 yum.repos.d]#

oraclelinux-releaseパッケージと、centos-releaseパッケージが競合するというもの。

/var/cache/yum/x86_64/6/ol6_latest/packages/に、oraclelinux-releaseパッケージがダウンロードされているので、rpmコマンドを使って強制的にインストールする。

[root@centos6 yum.repos.d]# rpm -Uvh --force /var/cache/yum/x86_64/6/ol6_latest/packages/oraclelinux-release-6Server-5.0.2.x86_64.rpm /var/cache/yum/x86_64/6/ol6_latest/packages/redhat-release-server-6Server-6.5.0.1.0.1.el6.x86_64.rpm
準備中...                ########################################### [100%]
   1:redhat-release-server  ########################################### [ 50%]
   2:oraclelinux-release    ########################################### [100%]
[root@centos6 yum.repos.d]#

これで「yum update」が可能になりました。

再起動後は以下の様な状態となりました。

[root@centos6 ~]# uname -a
Linux centos6.adosakana.net 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 11:28:47 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@centos6 ~]# rpm -qa|grep release
redhat-release-server-6Server-6.5.0.1.0.1.el6.x86_64
centos-release-6-4.el6.centos.10.x86_64
oraclelinux-release-6Server-5.0.2.x86_64
[root@centos6 ~]# cat /etc/motd
[root@centos6 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
[root@centos6 ~]#

ちなみに、Oracle Linux 6では、以下の追加レポジトリがある。
・MySQL 5.5 (ol6_MySQL)
・MySQL 5.6 (ol6_MySQL56)
・Unbrakable Enterprise kernel 2.6.39 (ol6_UEK_latest)
・Unbrakable Enterprise kernel 3.8.13 (ol6_UEKR3_latest)
・常に最新kernel。 (ol6_playground_latest)

詳細については、以前書いた「Oracle Linux用の公開レポジトリについて」を参照のこと。

RHEL4/CentOS4をOracle Linux4に!

今回の件を検証するため、CentOS4をセットアップした。

が・・・yum updateとかすると、エラー。
原因はCentOS4のレポジトリがアーカイブ化されてしまい、ミラーされなくなったため。

[root@centos4 ~]# yum update
Setting up Update Process
Setting up repositories
not using ftp, http[s], or file for repos, skipping - 4 is not a valid release or hasnt been released yet
Cannot find a valid baseurl for repo: update
Error: Cannot find a valid baseurl for repo: update
[root@centos4 ~]#

/etc/yum.repos.d/CentOS-Base.repo内にある「http://mirror.centos.org/centos/$releasever/」を「http://vault.centos.org/4.9/」、「http://mirror.centos.org/centos/RPM-GPG-KEY-centos4」を「http://vault.centos.org/RPM-GPG-KEY-centos4」に書き換え、また、「mirrorlist=~」をコメントにし、逆に「#baseurl=~」のコメントを外すことでアップデートはできるようになる。

が・・・、面倒なので、Oracle LinuxのPublic Yum Serverを使用するように切り替えてみる。
つまりは、Oracle Linuxへの乗り換え、ということになる。

切り替え手順は簡単。
How can I convert an RHEL or RHEL-compatible system to Oracle Linux using public-yum?」と「Getting Started」を行う。

具体的には、「OracleのGPGキーを登録」してから、「Yumレポジトリを追加」、ということになる。

[root@centos4 ~]# wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el4 -O /usr/share/rhn/RPM-GPG-KEY-oracle
--01:57:00--  http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el4
           => `/usr/share/rhn/RPM-GPG-KEY-oracle'
public-yum.oracle.com をDNSに問いあわせています... 203.179.83.11, 203.179.83.19
public-yum.oracle.com|203.179.83.11|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 1,744 (1.7K) 

100%[====================================>] 1,744         --.--K/s

01:57:01 (87.54 MB/s) - `/usr/share/rhn/RPM-GPG-KEY-oracle' を保存しました [1744/1744]

[root@centos4 ~]# gpg --quiet --with-fingerprint /usr/share/rhn/RPM-GPG-KEY-oracle
gpg: failed to create temporary file `/root/.gnupg/.#lk0x552ac57280.centos4.adosakana.net.4053': そのようなファイルやディレクトリはありません
gpg: 新しい構成ファイル`/root/.gnupg/gpg.conf'ができました
gpg: 警告: 「/root/.gnupg/gpg.conf」のオプションは起動している間、有効になりません
pub  1024D/B38A8516 2006-09-05 Oracle OSS group (Open Source Software group) &lt;build@oss.oracle.com>
                指紋 = 1122 A29A B257 825F 322C  234E 2E2B CDBC B38A 8516
sub  2048g/0042D4F4 2006-09-05 [有効期限: 2011-09-04]
[root@centos4 ~]# cd /etc/yum.repos.d
[root@centos4 yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.disabled
[root@centos4 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-el4.repo
--01:58:33--  http://public-yum.oracle.com/public-yum-el4.repo
           => `public-yum-el4.repo'
public-yum.oracle.com をDNSに問いあわせています... 203.179.83.19, 203.179.83.11
public-yum.oracle.com|203.179.83.19|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 1,191 (1.2K) 

100%[====================================>] 1,191         --.--K/s

01:58:33 (70.99 MB/s) - `public-yum-el4.repo' を保存しました [1191/1191]

[root@centos4 yum.repos.d]#

この後、「yum update」を実行すれば完了です。

ちなみに、この手法でアップデートした場合、release関連情報は以下のようになります。

[root@centos4 ~]# rpm -qa|grep release
enterprise-release-4-3.7.18
[root@centos4 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 9)
[root@centos4 ~]#  rpm -qa|grep logo
oracle-logos-1.1.1-3
[root@centos4 ~]#

また、/etc/yum.repos.d/ULN-Base.repo が追加されますが、こいつが問題児で、2014年9月現在、これは使用できません。
無効にしてしまいましょう。

[root@centos4 ~]# mv /etc/yum.repos.d/ULN-Base.repo /etc/yum.repos.d/ULN-Base.repo.disabled
[root@centos4 ~]#

ついでに、vmware-toolsをyumレポジトリとして追加するには、/etc/yum.repos.d/vmwaretools.repoとして、以下の内容を記載しましょう。

[root@centos4 ~]# cat /etc/yum.repos.d/vmwaretools.repo
[vmwaretools]
name=vmwaretools
baseurl=http://packages.vmware.com/tools/esx/latest/rhel4/x86_64/
gpgcheck=0
[root@centos4 ~]#

X-Windowsがあるシステムの場合「yum install vmware-tools-esx」、X-Windowsがないシステムなら「yum install vmware-tools-esx-nox」でvmware-toolsをインストールできます。

RHEL4/CentOS4向けのbash RPM(10/07 12:00修正)

bash脆弱性について、いろいろ状況が変わりつつあるので書き直し。

RHEL4/CentOS4サーバが生き残っている場合に、簡単に対処する方法があるのか探してみる。

まず、RedHatで情報を探すと、RHEL4については、延長サポート内では以下の脆弱性が該当するようだ。
RHSA-2014:1294-1 Critical: bash security update(CVE-2014-6271)
RHSA-2014:1311-1 Important: bash security update(CVE-2014-7169)

両方のページから情報を見ていくと、以下のページに着く。
Bash Code Injection Vulnerability via Specially Crafted Environment Variables (CVE-2014-6271, CVE-2014-7169)

さらに、検証や、パッチを提供できない場合に状況を緩和するための方策が掲載されている、以下のページがある。
Mitigating the shellshock vulnerability (CVE-2014-6271 and CVE-2014-7169)

で・・・9/27 7時頃に「Bash Code Injection Vulnerability via Specially Crafted Environment Variables (CVE-2014-6271, CVE-2014-7169)」を始め、各ページの情報が更新されていた。
Bash Code Injection Vulnerability via Specially Crafted Environment Variables (CVE-2014-6271, CVE-2014-7169)」の「Products Affected:」の「Red Hat Enterprise Linux 4」欄が「bash-3.0-27.el4.4」に書き換わった。
Important: bash security update」の「Updated packages」が「bash-3.0-27.el4.4.src.rpm」に書き換わった。

というわけで、「bash-3.0-27.el4.4」が出たようだ。

RedHatの延長サポートが提供するSource RPMを入手するのは面倒なので、Oracle LinuxのSource RPMを確認。
https://oss.oracle.com/el4/SRPMS-updates/を見ると、「bash-3.0-27.0.3.el4.src.rpm」が登場している。
Changelogを確認すると、以下の様になっている。

* Fri Sep 26 2014 Todd Vierling &lt;todd.vierling@oracle.com&gt; - 3.0-27.0.3
- Rework env function definition for safety (Florian Weimer) [CVE-2014-7169]

* Thu Sep 25 2014 Todd Vierling &lt;todd.vierling@oracle.com&gt; - 3.0-27.0.2
- Preliminary fix for CVE-2014-7169

* Wed Sep 24 2014 Guangyu Sun &lt;guangyu.sun@oracle.com&gt; - 3.0-27.0.1
- Check for fishy environment (Ondrej Oprala) [CVE-2014-6271]
Resolves: #1141644

RHEL4の「bash-3.0-27.el4.4」での修正内容が分からないので、同等品なのかが判断できないが、不足していたCVE-2014-7169対策の一環である、ということは分かった。

とりあえず、https://oss.oracle.com/el4/SRPMS-updates/bash-3.0-27.0.3.el4.src.rpmを入手して、「rpmbuild –rebuild bash-3.0-27.0.3.el4.src.rpm」でバイナリRPMを作って、インストール・・・・

という風にやってたのですが、しばらく修正が続きそうな感じもあります。
なので、これを機会にOracle Linux 4のPublic yum repositoryを使用してしまおう、という考えもあると思います。
その場合は、「RHEL4/CentOS4をOracle Linux4に!」という別記事の方を参照してください。
この切り替えを行ってしまうと、Oracle Linuxに乗り換える、という話になるのですが、Oracle Linux 4は、それ以降のバージョンと違って、ほとんど差がないですし、元のサポートが切れたRHEL/CentOSの方に戻る、ってことも無いでしょうから、あまり問題はないのではないでしょうか?


2014/09/29 11:00追記
https://github.com/hannob/bashcheckという脆弱性チェックスクリプト

bash-3.0-27.0.3.el4での実行結果は以下の様になった。

./bashcheck
Not vulnerable to CVE-2014-6271 (original shellshock)
Not vulnerable to CVE-2014-7169 (taviso bug)
Not vulnerable to CVE-2014-7186 (redir_stack bug)
Test for CVE-2014-7187 not reliable without address sanitizer
Variable function parser inactive, likely safe from unknown parser bugs
#

ちなみに、bash-3.0-27.0.2.el4だと以下だった。

./bashcheck
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
Not vulnerable to CVE-2014-6271 (original shellshock)
Not vulnerable to CVE-2014-7169 (taviso bug)
./bashcheck: line 18: 3528 Segmentation fault    bash -c "true $(printf '<<EOF %.0s' {1..79})" 2>/dev/null
Vulnerable to CVE-2014-7186 (redir_stack bug)
Test for CVE-2014-7187 not reliable without address sanitizer
Variable function parser inactive, likely safe from unknown parser bugs
#

2014/10/07 12:00追記

上記のbashcheckがバージョンアップし、下記の脆弱性に関するチェック項目が増えました。
CVE-2014-6278

bash-3.0-27.0.3.el4での実行結果は以下の様になった。

# ./bashcheck
Testing /bin/bash ...
GNU bash, version 3.00.15(1)-release (x86_64-redhat-linux-gnu)

Variable function parser pre/suffixed [(), redhat], bugs not exploitable
Not vulnerable to CVE-2014-6271 (original shellshock)
Not vulnerable to CVE-2014-7169 (taviso bug)
Not vulnerable to CVE-2014-7186 (redir_stack bug)
Test for CVE-2014-7187 not reliable without address sanitizer
Found non-exploitable CVE-2014-6277 (lcamtuf bug #1)
Not vulnerable to CVE-2014-6278 (lcamtuf bug #2)
#

CVE-2014-6277の判定は以下で行われていた。

bash -c "f(){ x(){ _;};x(){ _;}<<a;}"

で、これを直接実行すると、以下の結果になる。

# bash -c "f(){ x(){ _;};x(){ _;}<<a;}"
セグメンテーション違反です
# echo $?
139
#

正常終了できてないから問題あり、ということですね。


以下は古い情報です。
アーカイブとして残しておきます。


昨日から、bashの脆弱性に関して騒がしい。

RHEL4/CentOS4サーバが生き残ってる場合、簡単に対処できる方法があるのか探してみる。
まず公式情報を確認。

RHSA-2014:1294-1 Critical: bash security update(CVE-2014-6271)
ここに、「Red Hat Enterprise Linux ELS (v. 4)」「bash-3.0-27.el4.2.src.rpm」があるので、RHEL4の延長サポートであれば修正が出ているようだ。

ただ、延長サポート中のRHEL Souce RPMを探すのはめんどいので、前回と同じく、Oracle LinuxのSource RPM配布場所「https://oss.oracle.com/el4/SRPMS-updates/」をチェックしてみる。

とりあえず、2014年の更新分としては、以下があった。

2014/09/24 bash-3.0-27.0.1.el4.src.rpm
2014/09/25 bash-3.0-27.0.2.el4.src.rpm
2014/06/10 openssl-0.9.7a-43.18.0.2.el4.src.rpm
2014/09/16 tzdata-2014g-1.0.1.el4.src.rpm

bash-3.0-27.0.1.el4.src.rpmなら修正済みのバージョンなんですかね?

ということで・・・「rpmbuild –rebuild bash-3.0-27.0.1.el4.src.rpm」という感じでRPMパッケージを作成してインストールっと。
下記に追加したように修正が完全ではないようでした。

注意: 上記のURLは、source RPMです。コンパイル済みのバイナリRPMは、各自が作成してください。


2014/09/26 9:30追記

bash-3.0-27.0.1.el4.src.rpmの修正内容を確認すると、下記の様に書かれている。

* Wed Sep 24 2014 Guangyu Sun &lt;guangyu.sun@oracle.com&gt; - 3.0-27.0.1
- Check for fishy environment (Ondrej Oprala)
Resolves: #1141644

Oracleの#1141644とは何かを探すと「Oracle alert ELSA-2014-1293 (bash)」で、これは、「RedHat Critical: bash security update RHSA-2014-1293 / CVE-2014-6271」に該当する。

で、「Bash Code Injection Vulnerability via Specially Crafted Environment Variables (CVE-2014-6271, CVE-2014-7169)」を確認すると、「影響を受けるバージョン」として「Red Hat Enterprise Linux 4 bash-3.0-27.el4.2」が書かれている。

つうわけで、Oracle Linuxのbash 3.0-27.0.1はCVE-2014-7169で、RHELのbash 3.0-27.el4.2はCVE-2014-7169+CVE-2014-6271ということで、パッチが足りていない。
なおかつ、RHELのbash 3.0-27.el4.2、であっても完全な修正は行われていないので、完全な修正のためには次のバージョンを待つ必要がある、と。

じゃぁ、一時的に対処する方法はあるのか?と「Bash Code Injection Vulnerability via Specially Crafted Environment Variables (CVE-2014-6271, CVE-2014-7169)」に記載されているworkaroundを確認
・「mod_security」を使用
・「iptablesのstringモジュール」を使用

どっちも、RHEL4には存在しないじゃないですかー


2014/09/26 13:30+18:30修正

Oracle public yum の方にbash-3.0-27.0.2.el4.src.rpmが登場
2014/09/25 bash-3.0-27.0.2.el4.src.rpm

といっても、まだ、脆弱性が残ってるバージョンになりますけどね。
とりあえず、「env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”」で確認できる脆弱性については、コレで解決してますね。
ただ、bashの脆弱性は続々発見されているので、どこまでが該当してて、対応しなければならないのかよく分からない・・・


2014/09/26 17:00おまけ

iptablesのstringモジュールって、iptables-1.3.8を持ってくれば使えるのかな?と思って、足りないヘッダファイルをRHEL5から持ってきて、RHEL4環境に入れてみたんですが、RHEL4 kernel側が対応していないので無意味でした。


2014/09/26 20:00追記

RHEL4/CentOS4をOracle Linux4に!」という別記事も書いてたりします。

上記で上げたOracle LinuxのSource RPMを元にしているYUM レポジトリを使用する、という話です。
まぁ、RHEL/CentOSではなく、Oracle Linuxに乗り換える、という話ではありますが、Oracle Linux 4は、それ以降のバージョンと違って、ほとんど差がないですから、気軽に乗り換えることができます。

VMware toolsの配布場所:Windows&Linux&Solaris 2025/04/09版

2025/04/09修正 ドキュメントURLを修正
2024/05/21修正 Broadcom移管に伴うURL修正など反映
2022/11/15修正 最近のVMware Toolsのサポート状況についてまとめ直した

Windows編

Windows Server 2008R2 SP1~Windows Server 2025 / Windows 7 SP1~Windows 11 12.5.1(随時更新中,最新ESXi同梱版?)
 ReleaseNote:
 https://customerconnect.vmware.com/ja/downloads/details?downloadGroup=VMTOOLS1240&productId=742 ← Broadcom移行に伴い代替URLが不明
 https://packages.vmware.com/tools/releases/12.5.1/windows/

Windows Server 2008 SP2 / Vista SP2用 11.0.6(最終)
 ReleaseNote:
 https://customerconnect.vmware.com/ja/downloads/details?downloadGroup=VMTOOLS1106&productId=742 ← Broadcom移行に伴い代替URLが不明
 https://packages.vmware.com/tools/releases/11.0.6/windows/

Linux編

RHEL7以降はopen-vm-toolsを使う
 VMware support for open-vm-tools (VMware KB:2073803)(Broadcom KB:313456)

RHEL6/CentOS6用 10.3.26(随時更新中,最新ESXi同梱版?)
 ReleaseNote https://docs.vmware.com/en/VMware-Tools/10.3/rn/vmware-tools-10326-release-notes/index.html ← Broadcom移管後ドキュメント見当たらず
 https://customerconnect.vmware.com/ja/downloads/details?downloadGroup=VMTOOLS10326&productId=974 ← Broadcom移行に伴い代替URLが不明
 https://packages.vmware.com/tools/releases/10.3.26/rhel6/

RHEL5/CentOS5用 10.3.22(最終)
 ReleaseNote https://docs.vmware.com/en/VMware-Tools/10.3/rn/VMware-Tools-10322-Release-Notes.html ← Broadcom移管後ドキュメント見当たらず
 https://customerconnect.vmware.com/en/downloads/details?downloadGroup=VMTOOLS10322&productId=1072 ← Broadcom移行に伴い代替URLが不明
 https://packages.vmware.com/tools/releases/10.3.22/rhel5/
 なお、RHEL5はSSL1.2に非対応のため、2022年11月現在RHEL5サーバ上からhttpsアクセスがほぼ不可能になっていることに注意

Ubuntu 14.04以降はopen-vm-toolsを使う
 VMware support for open-vm-tools (VMware KB:2073803)(Broadcom KB:313456)

Ubuntu 10.04/11.04/11.10/12.04用 10.3.26(随時更新中)
 ReleaseNote https://docs.vmware.com/en/VMware-Tools/10.3/rn/vmware-tools-10326-release-notes/index.html ← Broadcom移管後ドキュメント見当たらず
 https://customerconnect.vmware.com/ja/downloads/details?downloadGroup=VMTOOLS10326&productId=974 ← Broadcom移行に伴い代替URLが不明
 https://packages.vmware.com/tools/releases/10.3.26/ubuntu/dists/
 なお、SSL1.2に非対応であるなら2022年11月現在サーバ上からhttpsアクセスがほぼ不可能になっていることに注意
 (Ubuntuの対応について調べていない)

Solaris x86編

Solaris 10 x86用 10.3.10(最終)
 ReleaseNote https://docs.vmware.com/jp/VMware-Tools/10.3/rn/vmware-tools-10310-release-notes.html ← Broadcom移管後ドキュメント見当たらず
 https://customerconnect.vmware.com/ja/downloads/details?downloadGroup=VMTOOLS10310&productId=742 ← Broadcom移行に伴い代替URLが不明
 https://packages.vmware.com/tools/frozen/solaris/


↓は参考用の過去の記録

古いOSだとSSL1.2非対応のため、httpsアクセスができなくなっていることに注意のこと


VMware toolsのダウンロードURLを調べていたら、Linuxディストリビューションの一部では、yumコマンドでダウンロードできるようなレポジトリファイルも配布されているのを発見したのでメモ書き。

バージョンごとの配布場所:
 https://packages.vmware.com/tools/releases

VMwareにあるvmware-tools配布場所:「https://packages.vmware.com/tools/esx/latest/index.html

Linux向けvmware-toolsについて

Linux向けレポジトリのファイル置き場:

vSpehre 6.7向け: https://packages.vmware.com/tools/esx/6.7latest/repos/
vSphere 7.0向け: https://packages.vmware.com/tools/esx/7.0/repos

レポジトリファイルは、上記4つの他に、SLES11.0, SLES11.1, SLES11.2, SLES11.3, Ubuntu10.04, Ubuntu11.10, Ubuntu12.04が公開されている。

RHEL/CentOSのyumコマンドでインストールする場合、
必要なドライバを一通りインストールする「yum install vmware-tools-esx-nox 」でインストールされるパッケージ

vmware-tools-esx-nox         
vmware-tools-core            
vmware-tools-foundation      
vmware-tools-guestlib        
vmware-tools-libraries-nox   
vmware-tools-plugins-autoUpgrade
vmware-tools-plugins-deployPkg
vmware-tools-plugins-guestInfo
vmware-tools-plugins-hgfsServer
vmware-tools-plugins-powerOps
vmware-tools-plugins-timeSync
vmware-tools-plugins-vix     
vmware-tools-plugins-vmbackup
vmware-tools-services

最小限ってことで「yum install vmware-tools-thinprint」でインストールされるパッケージ

vmware-tools-thinprint
vmware-tools-core
vmware-tools-foundation
vmware-tools-guestlib
vmware-tools-libraries-nox
vmware-tools-services

+追加でOSパッケージがいくつか
vmxnet3,vmw_pvscsi,vmware_balloonがインストールされるけど、vmware-tools-esx-noxでインストールした方がいい。

X-Windowsドライバを含めたインストールを行う「yum install vmware-tools-esx」でインストールされるパッケージ

vmware-tools-esx
vmware-tools-core         
vmware-tools-esx-nox      
vmware-tools-foundation   
vmware-tools-guestlib     
vmware-tools-libraries-nox
vmware-tools-libraries-x  
vmware-tools-plugins-autoUpgrade
vmware-tools-plugins-deployPkg
vmware-tools-plugins-desktopEvents
vmware-tools-plugins-guestInfo
vmware-tools-plugins-hgfsServer
vmware-tools-plugins-powerOps
vmware-tools-plugins-resolutionSet
vmware-tools-plugins-timeSync
vmware-tools-plugins-unity
vmware-tools-plugins-vix
vmware-tools-plugins-vmbackup
vmware-tools-services
vmware-tools-user

+追加でOSパッケージがいくつか

RHEL7/CentOS7など最近のLinuxでは、open-vm-toolsでのサポートになっているため、上記のモノは使用しない。

open-vm-tools に対する VMware のサポートについて (2074713)(英語の原文:VMware support of open-vm-tools (2073803))

具体的には以下のOSが対象となる。
・Fedora 19 and later releases
・Debian 7.x and later releases
・openSUSE 11.x and later releases
・Recent Ubuntu releases (12.04 LTS, 13.10 and later)
・Red Hat Enterprise Linux 7.0 and later releases
・SUSE Linux Enterprise 12 – available Q4 2014

RHEL5向けのvmware toolsの最終版は VMware Tools 10.3.22
また、RHEL5/CentOS5はTLS1.2に対応していない(TLS1.0/1.1のみ)ため、最近のWebサイトからwget/curlおよびyumコマンドでのアクセスができないことに注意
ISOファイルは Download Product:VMware Tools 10.3.22 から入手できる


Windows向けvmware-toolsについて

Windows版vmware-tools配布場所:https://packages.vmware.com/tools/esx/latest/windows/index.html

Windows Server 2008 SP2 / Windows Vista SP2の最終サポート: VMware Tools 11.0.6 (ダウンロードURL VMware Tools 11.0.6)

VMware tools 12.0.0以降からネットワークアダプタ VMXNet2(拡張)が使えなくなりました。いまだに使っている場合はVMXNet3に変更する必要がある(VMwware Tools 12.0.5リリースノートより)


Solaris x86向けvmware-toolsについて

Solaris x86をインストールした時に、VMware-toolsを探したのでメモ書きとして追加

公式文書としては「Installing and upgrading the latest version of VMware Tools on existing hosts (2129825)」が出てくるんだけど、Solaris用のVMware-toolsがどこから入手できるのかMy VMwareからダウンロードできるよ、しか書いてない。

[Product Download]-[VMware vSphere]で「Drivers&Tools」を選択し、「VMware Tools」のツリーを開く

いろいろ表示されている中の「VMware Tools 11.0.6」か「VMware Tools 11.1.0」を選択

するとリンク先には「Solaris用はVMware Tools 10.3.10が最後」と誘導されているので、そのリンクを飛ぶと、「VMware Tools packages for Solaris and OS X」がダウンロードできる。

これを展開して、ESXiの /usr/lib/vmware/isoimages に配置する。

といってもこれは /productLocker/vmtools/ へのシンボリックリンクになっている。

この「/productLocker」をさす先は、ESXiの設定でUserVars.ProductLockerLocation を使って指定する。

指定したディレクトリ内に「vmtools」というディレクトリを作成し、その中にisoイメージなどを展開しておくと、これを使ってVMware toolsのインストールをすることができるようになる。