GNU bash 脆弱性(shellshock)に対するサーバ対策

2014/09/29 技術系 投稿者:

GNU bashの脆弱性の問題対応について、かなり古いLinuxの場合の情報があまりなかったので、弊社が行った内容を公開いたします。
なお弊社では下記内容のサポートは行いませんので自己責任でお願いいたします。

■ CentOS 6
# yum update bash

■ CentOS 5
# yum update bash

■ RedHat Enterprise Linxux 4 /CentOS 4
Oracle Linux用のsrc.rpmをrpmbuildした。

# cd /usr/local/src
# wget https://oss.oracle.com/el4/SRPMS-updates/bash-3.0-27.0.3.el4.src.rpm
# rpm -ivh bash-3.0-27.0.3.el4.src.rpm
# cd /usr/src/redhat/SPECS
# rpmbuild –ba bash.spec
# cd ../RPMS/x86_64 (32bitの場合はi386)
# rpm -Uvh bash-3.0-27.0.3.x86_64.rpm

■ RedHat Enterprise Linxux 3 / CentOS 3
CentOS 3用のsrc.rpmにパッチ当ててrpmbuildした。

# wget http://vault.centos.org/3.9/os/SRPMS/bash-2.05b-41.7.centos.0.src.rpm
# rpm -ivh bash-2.05b-41.7.centos.0.src.rpm
# cd /usr/src/redhat/SOURCES
# wget http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-008
# wget http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-009
# wget http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-010
# cd ../SPECS
# vi bash.spec
———————————————————————
Release: 41.10.centos.0

Patch22: bash205b-008
Patch23: bash205b-009
Patch24: bash205b-010
以下パッチ番号を連番に修正

%patch22 -p0 -b .008
%patch23 -p0 -b .009
%patch24 -p0 -b .010
以下パッチ番号を連番に修正
———————————————————————
# rpmbuild –ba bash.spec
# cd ../RPMS/i386
# rpm -Uvh bash-2.05b-41.10.centos.0.i386.rpm

■ Redhat Linux release 7.3 及び 6.2
8.0用のsrc.rpmにパッチを当ててrpmbuildした。
※ autoconfでエラーが出たけど無視したので、動作に問題が出る可能性あり。

# cd /usr/local/src
# wget http://archive.download.redhat.com/pub/redhat/linux/8.0/ja/os/i386/SRPMS/bash-2.05b-5.src.rpm
# rpm -ivh bash-2.05b-5.src.rpm
# cd /usr/src/redhat/SOURCES
# wget http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-006
# wget http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-007
# wget http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-008
# wget http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-009
# wget http://ftp.gnu.org/gnu/bash/bash-2.05b-patches/bash205b-010
# cd ../SPECS
# vi bash.spec
———————————————————————
Release: 10

Patch18: bash205b-001
Patch19: bash205b-002
Patch20: bash205b-003
Patch21: bash205b-004
Patch22: bash205b-005
Patch23: bash205b-006
Patch24: bash205b-007
Patch25: bash205b-008
Patch26: bash205b-009
Patch27: bash205b-010

%patch18 -p0 -b .001
%patch19 -p0 -b .002
%patch20 -p0 -b .003
%patch21 -p0 -b .004
%patch22 -p0 -b .005
%patch23 -p0 -b .006
%patch24 -p0 -b .007
%patch25 -p0 -b .008
%patch26 -p0 -b .009
%patch27 -p0 -b .010
———————————————————————

# rpmbuild –ba bash.spec
# cd ../RPMS/i386
# rpm -Uvh bash-2.05b-10.i386.rpm

Redhat Linux release 6.2の場合にはskel関連でエラーが出たけどインストールできた。

■ Endian Firewall 2.5.1
上述のCentOS 4(i386)用にビルドしたrpmが適用できた。

■ XenServer
CentOS 5(i386)用のrpmが適用できた。

■ Debian 6.0.5
apt-get updateした

バージョンアップ後はテストをお忘れなく。

# env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”

カレンダー

    123
45678910
11121314151617
18192021222324
25262728293031
       
   1234
567891011
12131415161718
19202122232425
26272829   
       
    123
45678910
11121314151617
18192021222324
25262728293031
       
  12345
6789101112
13141516171819
20212223242526
27282930   
       
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
    123
45678910
11121314151617
18192021222324
252627282930 
       
 123456
78910111213
14151617181920
21222324252627
28293031   
       
     12
3456789
10111213141516
17181920212223
24252627282930
31      
   1234
567891011
12131415161718
19202122232425
2627282930  
       
1234567
891011121314
15161718192021
22232425262728
293031    
       
     12
3456789
10111213141516
17181920212223
24252627282930
       
  12345
6789101112
13141516171819
20212223242526
2728293031  
       
  12345
6789101112
13141516171819
20212223242526
2728     
       
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
   1234
567891011
12131415161718
19202122232425
262728293031 
       
 123456
78910111213
14151617181920
21222324252627
282930    
       
     12
3456789
10111213141516
17181920212223
24252627282930
31      
   1234
567891011
12131415161718
19202122232425
2627282930  
       
1234567
891011121314
15161718192021
22232425262728
293031    
       
    123
45678910
11121314151617
18192021222324
25262728293031
       
  12345
6789101112
13141516171819
20212223242526
27282930   
       
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
    123
45678910
11121314151617
18192021222324
252627282930 
       
 123456
78910111213
14151617181920
21222324252627
28293031   
       
  12345
6789101112
13141516171819
20212223242526
2728293031  
       
1234567
891011121314
15161718192021
22232425262728
2930     
       
    123
45678910
11121314151617
18192021222324
25262728293031
       
  12345
6789101112
13141516171819
20212223242526
27282930   
       
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
   1234
567891011
12131415161718
19202122232425
262728293031 
       
 123456
78910111213
14151617181920
21222324252627
282930    
       
     12
3456789
10111213141516
17181920212223
24252627282930
31      
   1234
567891011
12131415161718
19202122232425
2627282930  
       
1234567
891011121314
15161718192021
22232425262728
293031    
       
1234567
891011121314
15161718192021
22232425262728
       
       
    123
45678910
11121314151617
18192021222324
25262728293031
       
 123456
78910111213
14151617181920
21222324252627
28293031   
       
      1
2345678
9101112131415
16171819202122
23242526272829
30      
     12
3456789
10111213141516
17181920212223
24252627282930
31      
1234567
891011121314
15161718192021
22232425262728
2930     
       
    123
45678910
11121314151617
18192021222324
25262728293031
       
  12345
6789101112
13141516171819
20212223242526
27282930   
       
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
     12
3456789
10111213141516
17181920212223
242526272829 
       
  12345
6789101112
13141516171819
20212223242526
2728293031  
       
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
    123
45678910
11121314151617
18192021222324
252627282930 
       
 123456
78910111213
14151617181920
21222324252627
28293031   
       
      1
2345678
9101112131415
16171819202122
23242526272829
30      
   1234
567891011
12131415161718
19202122232425
262728293031 
       
1234567
891011121314
15161718192021
22232425262728
293031    
       
     12
3456789
10111213141516
17181920212223
24252627282930
       
  12345
6789101112
13141516171819
20212223242526
2728293031  
       
1234567
891011121314
15161718192021
22232425262728
2930     
       
    123
45678910
11121314151617
18192021222324
25262728293031
       
    123
45678910
11121314151617
18192021222324
25262728   
       
 123456
78910111213
14151617181920
21222324252627
28293031   
       
     12
3456789
10111213141516
17181920212223
24252627282930
31      
   1234
567891011
12131415161718
19202122232425
2627282930  
       
1234567
891011121314
15161718192021
22232425262728
293031    
       
     12
3456789
10111213141516
17181920212223
24252627282930
       
  12345
6789101112
13141516171819
20212223242526
2728293031  
       
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
    123
45678910
11121314151617
18192021222324
252627282930 
       
 123456
78910111213
14151617181920
21222324252627
28293031   
       
      1
2345678
9101112131415
16171819202122
23242526272829
30      
   1234
567891011
12131415161718
19202122232425
262728293031 
       
   1234
567891011
12131415161718
19202122232425
262728    
       
1234567
891011121314
15161718192021
22232425262728
293031    
       
    123
45678910
11121314151617
18192021222324
25262728293031
       
  12345
6789101112
13141516171819
20212223242526
27282930   
       
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
    123
45678910
11121314151617
18192021222324
252627282930 
       
 123456
78910111213
14151617181920
21222324252627
28293031   
       
     12
3456789
10111213141516
17181920212223
24252627282930
31      
   1234
567891011
12131415161718
19202122232425
2627282930  
       
1234567
891011121314
15161718192021
22232425262728
293031    
       
     12
3456789
10111213141516
17181920212223
24252627282930
       
  12345
6789101112
13141516171819
20212223242526
2728     
       
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
   1234
567891011
12131415161718
19202122232425
262728293031 
       
 123456
78910111213
14151617181920
21222324252627
282930    
       
1234567
891011121314
15161718192021
22232425262728
293031    
       
    123
45678910
11121314151617
18192021222324
25262728293031
       
  12345
6789101112
13141516171819
20212223242526
27282930   
       
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
    123
45678910
11121314151617
18192021222324
252627282930 
       
 123456
78910111213
14151617181920
21222324252627
28293031   
       
1234567
891011121314
15161718192021
22232425262728
29      
       
    123
45678910
11121314151617
18192021222324
25262728293031
       
 123456
78910111213
14151617181920
21222324252627
28293031   
       
      1
2345678
9101112131415
16171819202122
23242526272829
30      
   1234
567891011
12131415161718
19202122232425
262728293031 
       
 123456
78910111213
14151617181920
21222324252627
282930    
       
    123
45678910
11121314151617
18192021222324
25262728293031
       
  12345
6789101112
13141516171819
20212223242526
27282930   
       
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
      1
2345678
9101112131415
16171819202122
232425262728 
       
   1234
567891011
12131415161718
19202122232425
262728293031 
       
1234567
891011121314
15161718192021
22232425262728
293031    
       
     12
3456789
10111213141516
17181920212223
24252627282930
       
  12345
6789101112
13141516171819
20212223242526
2728293031  
       
1234567
891011121314
15161718192021
22232425262728
2930     
       
    123
45678910
11121314151617
18192021222324
25262728293031
       
 123456
78910111213
14151617181920
21222324252627
28293031   
       
      1
2345678
9101112131415
16171819202122
23242526272829
30      
   1234
567891011
12131415161718
19202122232425
262728293031 
       
 123456
78910111213
14151617181920
21222324252627
282930    
       
     12
3456789
10111213141516
17181920212223
2425262728  
       
  12345
6789101112
13141516171819
20212223242526
2728293031  
       
      1
2345678
9101112131415
16171819202122
23242526272829
3031     
    123
45678910
11121314151617
18192021222324
252627282930 
       
 123456
78910111213
14151617181920
21222324252627
28293031   
       
      1
2345678
9101112131415
16171819202122
23242526272829
30      
   1234
567891011
12131415161718
19202122232425
262728293031 
       
1234567
891011121314
15161718192021
22232425262728
293031    
       
U・Iターン転職しませんか?
群馬データセンター
群馬の法人ITサポートサービス Wide Net[ワイドネット]
Wide Netのクラウドバックアップ
クラウド型ファイル共有サービスRushDrive
ワイドオフィス