Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

VxRail:Apache Log4Shellの脆弱性(CVE-2021-44228、CVE-2021-45046、およびCVE-2021-4104)を修復するためのVxRail Managerの回避策

Summary: この記事では、Apache Log4Shellの脆弱性を修復するためにVxRail Managerで実行できるスクリプトについて概説します。この脆弱性については、CVE-2021-44228、CVE-2021-45046、CVE-2021-4104(Dell記事DS-2021-007、VMware記事VMSA-2021-0028)で説明されています。

This article may have been automatically translated. If you have any feedback regarding its quality, please let us know using the form at the bottom of this page.

Article Content


Instructions

Apache Software Foundationは、Apache Log4jライブラリーで任意のコードをリモートで実行する、Log4Shellと呼ばれる重大な脆弱性の問題に関する情報を公開しました。この脆弱性については、GitHubアドバイザリー データベースで説明されています(CVE-2021-44228CVE-2021-45046CVE-2021-4104でも詳述)。VxRail Managerは、この脆弱性で説明されている問題の影響を受ける危険性があります。

メモ:CVE-2021-45046とCVE-2021-4104の2つの追加CVEでは、CVE-2021-44228 (Log4j 2.x)に記載されている、問題を修正するために最初に推奨された修正が完全ではないと報告しています。

これらのCVEの詳細については、次の記事を参照してください。

注:この記事のスクリプトは、バージョン1.1.2にアップデートされました。これには、CVE-2021-44228、CVE-2021-45046、CVE-2021-4104の3つのCVEすべてに推奨される修復が含まれています。

以前のスクリプトで、対象ファイルがシステム アーカイブからVxRail Managerにリストアされる可能性のある追加の問題が検出されました。この問題についても、このリリースで対処されています。

この記事に記載されている以前のスクリプトを使用した場合は、最新のスクリプト(1.1.2)をダウンロードしてVxRail Managerで実行し、完全な修正を確実に行ってください。

 

要件と範囲

この記事の修正手順の適用範囲は次のとおりです。

  • この記事は、VxRail 4.5.x、4.7.x、7.0.xリリースのVxRail Managerと、VCF 3.xおよび4.xリリースのVxRail Managerに適用されます。
  • 提供されたスクリプトと修復手順は、VxRail ManagerアプライアンスVMのみの脆弱性を修復します。
  • vCenter Server Appliance (vCSA)、NSXなど、VxRail Manager外のその他のコンポーネントは、個別に問題を軽減する必要があり、このスクリプトには含まれていません。
  • また、このスクリプトは、脆弱性の影響を受ける可能性のあるVM内で実行されているアプリケーションやサービスは修復しません。Dell EMCでは、すべてのお客様に、お使いのアプリケーションまたはソフトウェアのベンダーに連絡し、VMで実行されているサービスが影響を受けないことを確認するようお勧めします。

影響を受けるVMware製品および可能性のある回避策へのリンクについては、次のVMware VMSA文書を参照してください。

VMwareでは、次の記事でvCenter Server Applianceの修復を自動化するためのスクリプトを提供しています。

この記事には、VxRail Manager専用スクリプトを含むfixlog4j-CVE-2021-44228-CVE-2021-45046-v-1-1-2.zipファイルが添付されています。
 

修正を含むVxRailリリース

この問題は、次のVxRailソフトウェア リリースで解決されています。

  • VxRailパッケージ ソフトウェア7.0.320
  • VxRail Applianceソフトウェア4.7.541
  • VxRail Applianceソフトウェア4.5.471

修正を含むVxRailソフトウェア リリースにアップグレードすることをお勧めします。
このスクリプトは、すぐにアップグレードできないお客様にお勧めします。

メモ:お使いのVxRail 7.0.xxxクラスターがお客様が管理するvCenterによって管理されている場合は、次の記事を参照して、該当する可能性のあるその他の考慮事項について確認してください。

 

修復手順

この問題を修復するには、次の手順を実行します。
  1. この記事に添付されているfixlog4j-CVE-2021-44228-CVE-2021-45046-v-1-1-2.zipファイルをダウンロードします。
  2. SCP経由でmysticユーザーを使用して.zipファイルをVxRail Managerにアップロードします(使用可能なSCPクライアントの例はWinSCPです)。
  3. VxRail Manager VMコンソールにログインするか、mysticユーザーを使用してSSH接続します。 
  4. .zipファイルをアップロードした場所にディレクトリーを変更し、unzipコマンドを使用して解凍します。
    mystic@vxrm:~> unzip fixlog4j-CVE-2021-44228-CVE-2021-45046-v-1-1-2.zip
    Archive:  fixlog4j-CVE-2021-44228-CVE-2021-45046-v-1-1-2.zip
      inflating: fixlog4j-CVE-2021-44228-CVE-2021-45046.sh
  5. chmodコマンドを使用して、スクリプトを実行可能にします。
    mystic@vxrm:~> chmod +x fixlog4j-CVE-2021-44228-CVE-2021-45046.sh
  6. suコマンドを使用して、VxRail Managerにrootユーザーとしてログインします。
    mystic@vxrm:~> su -
    Password:
  7. スクリプト パッケージを解凍した場所と同じディレクトリーにいることを確認します。
    vxrm:~ # cd /home/mystic
    vxrm:/home/mystic #
  8. 次のスクリプトを実行します。
    vxrm:/home/mystic # ./fixlog4j-CVE-2021-44228-CVE-2021-45046.sh

    スクリプト出力の例:
    Stop MARVIN and runjars service before patching the system

    /mystic/connectors/eservice/lib/log4j-core-2.13.0.jar is affected by CVE-2021-44228 and CVE-2021-45046, need to apply patch
    patching /mystic/connectors/eservice/lib/log4j-core-2.13.0.jar
    Successfully patched /mystic/connectors/eservice/lib/log4j-core-2.13.0.jar

    /mystic/connectors/cluster/lib/log4j-core-2.13.0.jar is affected by CVE-2021-44228 and CVE-2021-45046, need to apply patch
    patching /mystic/connectors/cluster/lib/log4j-core-2.13.0.jar
    Successfully patched /mystic/connectors/cluster/lib/log4j-core-2.13.0.jar

    To ensure there is no reload behavior, we need to pack the .war file as well.
    looks like /usr/lib/vmware-marvin/marvind/webapps/ROOT.war contains the bad log4j-core library WEB-INF/lib/log4j-core-2.13.0.jar
    Archive:  /usr/lib/vmware-marvin/marvind/webapps/ROOT.war
      inflating: WEB-INF/lib/log4j-core-2.13.0.jar
    Patching WEB-INF/lib/log4j-core-2.13.0.jar in /usr/lib/vmware-marvin/marvind/webapps/ROOT.war
    Repack /usr/lib/vmware-marvin/marvind/webapps/ROOT.war
    updating: WEB-INF/lib/log4j-core-2.13.0.jar (deflated 11%)
    Clean up the ROOT folder...

    Always apply a reboot of MARVIN and runjars services
    restart MARVIN
    MARVIN restart successfully
    restart runjars
    runjars restart successfully

注:すべてのファイルが修復され、VxRail Managerサービスが開始されるまで、5~10分かかる場合があります。

以下の手動による検証手順のいずれかを実行する予定の場合は、少なくとも10分お待ちください。

VxRail Managerのリリースに応じて、lib4j-coreライブラリーにはいくつかの異なるバージョンがあります。

このスクリプトは、該当するVxRail Managerのバージョンに含まれているlib4j-coreのバージョンに関係なく、VxRail Managerを正しく修復するように設計されています。

スクリプトを実行した上記の出力では、含まれるlib4j-coreのバージョンに応じて、アップデートされるファイルが異なる場合があります。

メモ:修正が含まれていないVxRailの別のビルドにVxRailをアップグレードする場合は、このスクリプトを再度実行して修復を再適用する必要があります。
 

 メモ: VxRailで完全な軽減策を適用するには、VMwareからのvCenter Server Appliance (vCSA)の回避策と、このスクリプトによって実行されるVxRail Managerの修復の両方を実装する必要があります。


VMware製品に対する回避策および修正に関するVMware記事へのリンクは、「VxRail:Log4Shell (CVE-2021-44228)およびVxRail環境に関する情報(英語)」に記載されています。
 

検証手順

この問題を修復するため、スクリプトによりlib4j-core-* jarファイルからJndiLookup.classファイルを削除します。

jarファイルは、複数のクラス、メタデータ、その他のJavaプログラムを1つのファイルに含むJavaパッケージ形式です。これは、.zipファイルの概念に似ており、.zip形式に基づいています。スクリプトの実行により、各jarファイルが正常に更新されたことを確認します。

スクリプトが正常に機能したことを手動で確認するには、VxRail Managerに存在するlog4j-core-* jarファイルに影響を受けるJndiLookup.classファイルがまだ含まれているかどうかを確認できます。正常に機能した場合は、次のコマンドへの出力は表示されません。これにより、影響を受けるJndiLookup.classファイルがjarファイルに存在しないことが分かります。
 

自動コマンドによる検証

VxRail Managerで次のコマンドを実行して、VxRail Managerに存在するすべてのlog4j-core-xxxx.jarファイルをスキャンし、影響を受けるJndiLookup.classファイルを含むかどうかを確認します。

vxrm:/home/mystic # for myfile in `find / -name log4j-core*jar -print |grep -v log4jbak`; do echo $myfile; unzip -l $myfile | grep JndiLookup.class; done

出力例(アップデート済みシステム):
/mystic/connectors/eservice/lib/log4j-core-2.13.0.jar
/mystic/connectors/cluster/lib/log4j-core-2.13.0.jar
/usr/lib/vmware-marvin/marvind/webapps/ROOT/WEB-INF/lib/log4j-core-2.13.0.jar


上記の例では、JndiLookup.classファイルはjarに存在しません。したがって、スクリプトは正常に機能し、検証は成功しました。

以下は、アップデートする対象システムの出力例です。
/mystic/connectors/eservice/lib/log4j-core-2.13.3.jar
     2892  2020-05-10 12:08   org/apache/logging/log4j/core/lookup/
JndiLookup.class
/mystic/connectors/cluster/lib/log4j-core-2.13.3.jar
     2892  2020-05-10 12:08   org/apache/logging/log4j/core/lookup/
JndiLookup.class
/usr/lib/vmware-marvin/marvind/webapps/ROOT/WEB-INF/lib/log4j-core-2.13.3.jar
     2892  2020-05-10 12:08   org/apache/logging/log4j/core/lookup/
JndiLookup.class

上記の例では、影響を受けるJndiLookup.classファイルがlog4j-core-2.13.3.jar jarファイルにまだ存在します。
 

各ファイルの手動による検証

VxRail Managerに存在するlog4j-core-xxxx.jarファイルをすばやく特定するには、次のコマンドを実行します(これもまた出力を使用可能なコマンドにフォーマットします)。
vxrm:/home/mystic # find / -name log4j-core*jar -print |grep -v log4jbak | awk '{print("unzip -l " $1 "|grep JndiLookup.class")}'

出力例:
unzip -l /mystic/connectors/eservice/lib/log4j-core-2.13.0.jar|grep JndiLookup.class
unzip -l /mystic/connectors/cluster/lib/log4j-core-2.13.0.jar|grep JndiLookup.class
unzip -l /usr/lib/vmware-marvin/marvind/webapps/ROOT/WEB-INF/lib/log4j-core-2.13.0.jar|grep JndiLookup.class


上記の出力例から、各コマンドを手動で実行し、影響を受けるJndiLookup.classファイルが検出されるか確認します。
vxrm:/home/mystic # unzip -l /mystic/connectors/eservice/lib/log4j-core-2.13.0.jar|grep JndiLookup.class
vxrm:/home/mystic #

vxrm:/home/mystic # unzip -l /mystic/connectors/cluster/lib/log4j-core-2.13.0.jar|grep JndiLookup.class
vxrm:/home/mystic #

vxrm:/home/mystic # unzip -l /usr/lib/vmware-marvin/marvind/webapps/ROOT/WEB-INF/lib/log4j-core-2.13.0.jar|grep JndiLookup.class
vxrm:/home/mystic #


上記の例では、JndiLookup.classファイルはjarに存在しません。したがって、スクリプトが機能し、検証は成功しました。

メモ:上記の出力例にあるjarファイル名は、VxRail Managerのバージョンによって異なる場合があります。上記のfindコマンドから受信した出力例を使用します。

jarファイルにまだ影響を受けるJndiLookup.classファイルが含まれる場合の出力例:

vxrm:/home/mystic # unzip -l /mystic/connectors/cluster/lib/log4j-core-2.4.1.jar |grep JndiLookup.class
2576 2015-10-08 17:50 org/apache/logging/log4j/core/lookup/
JndiLookup.class

上記の例では、影響を受けるJndiLookup.classファイルがlog4j-core-2.4.1.jar jarファイルにまだ存在します。

 

 メモ: VxRailで完全な軽減策を適用するには、VMwareからのvCenter Server Appliance (vCSA)の回避策と、このスクリプトによって実行されるVxRail Managerの修復の両方を実装する必要があります。

Article Properties


Affected Product

VxRail, VxRail Appliance Family, VxRail Appliance Series, VxRail Software

Last Published Date

30 Aug 2022

Version

18

Article Type

How To