The Apache Software Foundation has published information about a critical Apache Log4j Library Remote Code Execution Vulnerability issue that is known as Log4Shell as per the GitHub Advisory Database (also detailed in CVE-2021-44228, CVE-2021-45046, and CVE-2021-4104). VxRail Manager is exposed to the issue outlined in the vulnerability.
Note: Two additional CVEs, CVE-2021-45046 and CVE-2021-4104, are reported indicating that the original recommendation to remediate the issue described in CVE-2021-44228 (Log4j 2.x) is not a complete fix.
For more on these CVEs, see the following articles:
Note: The script in this article has been updated to version 1.1.2 which includes the remediations that are recommended for all three CVEs, CVE-2021-44228, CVE-2021-45046, and CVE-2021-4104.
An additional issue was discovered in the previous script which may result in an impacted file being restored on VxRail Manager from a system archive. This issue has also been addressed in this release.
If you used any previous scripts that were provided with this article, then download the latest script (1.1.2) and run it on VxRail Manager to ensure you have the complete fix.
This scope of what is covered by the remediation steps in this article are:
Links to impacted VMware products and potential workarounds are detailed in the following VMware VMSA article:
VMware provides a script to automate the remediation in the vCenter Server Appliance in the following article:Attached to this article is file fixlog4j-CVE-2021-44228-CVE-2021-45046-v-1-1-2.zip which contains the script for VxRail Manager only.
This issue has is resolved in the following VxRail software releases:
It is recommended to upgrade to a VxRail software release which includes the fix.
The script is recommended for customers who are unable to upgrade immediately.
Note: If your VxRail 7.0.xxx cluster is managed by a customer managed vCenter, see the following article for additional considerations which may apply:
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
mystic@vxrm:~> chmod +x fixlog4j-CVE-2021-44228-CVE-2021-45046.sh
mystic@vxrm:~> su - Password:
vxrm:~ # cd /home/mystic vxrm:/home/mystic #
vxrm:/home/mystic # ./fixlog4j-CVE-2021-44228-CVE-2021-45046.sh
Example script output:
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
NOTE: The full mitigation for VxRail requires both the vCenter Server Appliance (vCSA) workaround from VMware, and the remediation on VxRail Manager that is performed by this script to be implemented.
Links to VMware articles covering workarounds to their products and fixes is found in VxRail: Information on Log4Shell (CVE-2021-44228) and VxRail environments.
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
/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
/usr/lib/vmware-marvin/marvind/webapps/ROOT/WEB-INF/lib/log4j-core-2.17.1.jar 3158 2021-12-27 17:30 org/apache/logging/log4j/core/lookup/JndiLookup.class /mystic/connectors/eservice/lib/log4j-core-2.17.1.jar 3158 2021-12-27 17:30 org/apache/logging/log4j/core/lookup/JndiLookup.class /mystic/connectors/cluster/lib/log4j-core-2.17.1.jar 3158 2021-12-27 17:30 org/apache/logging/log4j/core/lookup/JndiLookup.classIn the above example you can see the JndiLookup.class file in the output but the fix for the issue is in log4j-core-2.17.1.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
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 #
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
NOTE: Another reminder that full mitigation for VxRail requires both the vCenter Server Appliance (vCSA) workaround from VMware, and the remediation on VxRail Manager performed by this script to be implemented.
fixlog4j-CVE-2021-44228-CVE-2021-45046-v-1-1-2_pkb_en_US_1.zip