IBM Support

Security Bulletin: IBM Data Virtualization on Cloud Pak for Data is vulnerable to arbitrary code execution (CVE-2021-45046) and denial of service (CVE-2021-45105) due to Apache Log4j

Security Bulletin


Summary

There are vulnerabilities in the version of Apache Log4j that is used by IBM Data Virtualization on Cloud Pak for Data (CVE-2021-45046 and CVE-2021-45105) which is used for logging. The fix includes Apache Log4j 2.17.1.

Vulnerability Details

CVEID:   CVE-2021-45105
DESCRIPTION:   Apache Log4j is vulnerable to a denial of service, caused by the failure to protect from uncontrolled recursion from self-referential lookups. A remote attacker with control over Thread Context Map (MDC) input data could craft malicious input data that contains a recursive lookup to cause a StackOverflowError that will terminate the process. Note: The vulnerability is also called LOG4J2-3230.
CVSS Base score: 7.5
CVSS Temporal Score: See: https://exchange.xforce.ibmcloud.com/vulnerabilities/215647 for the current score.
CVSS Vector: (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)

CVEID:   CVE-2021-45046
DESCRIPTION:   Apache Log4j could result in remote code execution, caused by an incomplete fix of CVE-2021-44228 in certain non-default configurations. When the logging configuration uses a non-default Pattern Layout with a Context Lookup, an attacker with control over Thread Context Map (MDC) input data can craft malicious input data using a JNDI Lookup pattern to leak sensitive information and remote code execution in some environments and local code execution in all environments.
CVSS Base score: 9
CVSS Temporal Score: See: https://exchange.xforce.ibmcloud.com/vulnerabilities/215195 for the current score.
CVSS Vector: (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H)

Affected Products and Versions

Affected Product(s)DV Version(s)

CPD Version(s)

IBM Data Virtualization(DV) on Cloud Pak for Data(CPD)1.3.02.5.0
IBM Data Virtualization(DV) on Cloud Pak for Data(CPD)1.4.13.0.1
IBM Data Virtualization(DV) on Cloud Pak for Data(CPD)1.5.0

3.5,

3.5 Refresh 1 - 9

IBM Data Virtualization(DV) on Cloud Pak for Data(CPD)1.7.1 - 1.7.34.0 Refresh 1 - 3
IBM Data Virtualization(DV) on Cloud Pak for Data(CPD)1.7.34.0 Refresh 4

Remediation/Fixes

IBM strongly recommends addressing the vulnerability now.

Affected Product(s)DV Version(s) CPD Version(s) Fixes
IBM Data Virtualization(DV) on Cloud Pak for Data(CPD)1.3.02.5.0

Upgrade to version 1.5.0 patch version 1.5.0.0-270 (DV) /

3.5 Refresh 10 (CPD)

IBM Data Virtualization(DV) on Cloud Pak for Data(CPD)1.4.13.0.1

Upgrade to version 1.5.0 patch version 1.5.0.0-270 (DV) /

3.5 Refresh 10 (CPD)

IBM Data Virtualization(DV) on Cloud Pak for Data(CPD)1.5.0

3.5,

3.5 Refresh 1 - 9

Apply patch version 1.5.0.0-270 (DV) /

3.5 Refresh 10 (CPD)

IBM Data Virtualization(DV) on Cloud Pak for Data(CPD)1.7.1 - 1.7.34.0 Refresh 1 - 3

Update to version 1.7.5 (DV) /

4.0 Refresh 5 (CPD)

IBM Data Virtualization(DV) on Cloud Pak for Data(CPD)1.7.34.0 Refresh 4

Update to version 1.7.5 (DV) /

4.0 Refresh 5 (CPD)

You must update the Cloud Pak for Data platform to version 4.0 Refresh 5 to install the fix for Data Virtualization.

To update Cloud Pak for Data platform to 4.0 Refresh 5, see the following links:

The following procedure covers the steps after installing the fix for Data Virtualization.
  1. Run the following steps from the Data Virtualization head pod to manually remove unnecessary files from your updated Data Virtualization instance. These include files that contained old log4j binaries. Not all of the files might be present if you previously installed other log4j fixes.
    1. Log in to the Data Virtualization head pod.
      oc rsh c-db2u-dv-db2u-0
    2. Switch to the db2inst1 user.
      su - db2inst1
    3. Remove unnecessary JAR files.
      rm -rf /mnt/blumeta0/home/db2inst1/sqllib/datavirtualization/dvm_driver/log4j-api-2.8.2.jar /mnt/blumeta0/home/db2inst1/sqllib/datavirtualization/dvm_driver/log4j-core-2.8.2.jar /mnt/blumeta0/home/db2inst1/sqllib/datavirtualization/dvm_driver/log4j-api-2.15.0.jar /mnt/blumeta0/home/db2inst1/sqllib/datavirtualization/dvm_driver/log4j-core-2.15.0.jar /mnt/bludata0/dv/versioned/pre_migration/sqllib/datavirtualization/dvm_driver/log4j-api-2.8.2.jar /mnt/bludata0/dv/versioned/pre_migration/sqllib/datavirtualization/dvm_driver/log4j-core-2.8.2.jar /mnt/bludata0/dv/versioned/pre_migration/sqllib/datavirtualization/dvm_driver/log4j-api-2.15.0.jar /mnt/bludata0/dv/versioned/pre_migration/sqllib/datavirtualization/dvm_driver/log4j-core-2.15.0.jar
      
      ${BIGSQL_CLI_DIR}/BIGSQL/package/scripts/bigsqlPexec.sh -w -c "rm -rf /mnt/blumeta0/home/db2inst1/sqllib/datavirtualization/dvm_driver/log4j-api-2.8.2.jar" ${BIGSQL_CLI_DIR}/BIGSQL/package/scripts/bigsqlPexec.sh -w -c "rm -rf /mnt/blumeta0/home/db2inst1/sqllib/datavirtualization/dvm_driver/log4j-core-2.8.2.jar" ${BIGSQL_CLI_DIR}/BIGSQL/package/scripts/bigsqlPexec.sh -w -c "rm -rf /mnt/blumeta0/home/db2inst1/sqllib/datavirtualization/dvm_driver/log4j-api-2.15.0.jar" ${BIGSQL_CLI_DIR}/BIGSQL/package/scripts/bigsqlPexec.sh -w -c "rm -rf /mnt/blumeta0/home/db2inst1/sqllib/datavirtualization/dvm_driver/log4j-core-2.15.0.jar"
    4. Remove unnecessary ZIP and TAR files.
      rm -rf /mnt/PV/versioned/uc_dsserver_shared/config/DATAVIRTUALIZATION_ENDPOINT_V1.7*.tar.gz /mnt/PV/versioned/uc_dsserver_shared/config/DATAVIRTUALIZATION_ENDPOINT_V1.7*.zip
    5. Copy the latest TAR file.
      cp /opt/ibm/qp_artifacts/archives/DATAVIRTUALIZATION_ENDPOINT_V1.7.5_*.tar.gz /mnt/PV/versioned/uc_dsserver_shared/config
    6. Copy the latest ZIP file.
      cp /opt/ibm/qp_artifacts/archives/DATAVIRTUALIZATION_ENDPOINT_V1.7.5_*.zip /mnt/PV/versioned/uc_dsserver_shared/config
  2. Complete the following steps to manually restart head and worker pods to complete applying the fix. This manual restart can be performed by running the following command:
    1. Wait for the Data Virtualization hurricane pod to start up successfully.
    2. Run the following commands to restart the Data Virtualization head and worker pods:
      current_replicas=$(oc get sts c-db2u-dv-db2u -o jsonpath="{.spec.replicas}"); oc scale sts c-db2u-dv-db2u --replicas=0; sleep 3m; oc scale sts c-db2u-dv-db2u --replicas=$current_replicas
    3. If you see the following error message, restart the Data Virtualization hurricane pod and then repeat step 2. b)
      ERR api/pkg/cli/sideload/load.go:73 error="file is the wrong size: 154274816, expected: 154143232\n"
  3. Data Virtualization is now ready to use.
Note:
If you run a security vulnerability scanning tool on the Docker images, you might find that some of the affected packages at the affected version are still present on it.
Those packages have been modified according to guidance provided by the Apache Log4j development team so that they are no longer vulnerable.

Workarounds and Mitigations

None

Get Notified about Future Security Bulletins

References

Off

Acknowledgement

Change History

24 Jan 2022: Initial Publication

*The CVSS Environment Score is customer environment specific and will ultimately impact the Overall CVSS Score. Customers can evaluate the impact of this vulnerability in their environments by accessing the links in the Reference section of this Security Bulletin.

Disclaimer

According to the Forum of Incident Response and Security Teams (FIRST), the Common Vulnerability Scoring System (CVSS) is an "industry open standard designed to convey vulnerability severity and help to determine urgency and priority of response." IBM PROVIDES THE CVSS SCORES ""AS IS"" WITHOUT WARRANTY OF ANY KIND, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. CUSTOMERS ARE RESPONSIBLE FOR ASSESSING THE IMPACT OF ANY ACTUAL OR POTENTIAL SECURITY VULNERABILITY. In addition to other efforts to address potential vulnerabilities, IBM periodically updates the record of components contained in our product offerings. As part of that effort, if IBM identifies previously unidentified packages in a product/service inventory, we address relevant vulnerabilities regardless of CVE date. Inclusion of an older CVEID does not demonstrate that the referenced product has been used by IBM since that date, nor that IBM was aware of a vulnerability as of that date. We are making clients aware of relevant vulnerabilities as we become aware of them. "Affected Products and Versions" referenced in IBM Security Bulletins are intended to be only products and versions that are supported by IBM and have not passed their end-of-support or warranty date. Thus, failure to reference unsupported or extended-support products and versions in this Security Bulletin does not constitute a determination by IBM that they are unaffected by the vulnerability. Reference to one or more unsupported versions in this Security Bulletin shall not create an obligation for IBM to provide fixes for any unsupported or extended-support products or versions.

Document Location

Worldwide

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSK1AQ","label":"IBM Data Virtualization"},"Component":"","Platform":[{"code":"PF043","label":"Red Hat"},{"code":"PF040","label":"RedHat OpenShift"}],"Version":"1.3.0\/2.5.0, 1.4.1\/3.0.1, 1.5.0\/3.5, 1.5.0\/3.5 Refresh 1 - 9, 1.7.1 - 1.7.3\/4.0 Refresh 1 - 3, 1.7.3\/4.0 Refresh 4","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSK1AQ","label":"IBM Data Virtualization"},"Component":"","Platform":[{"code":"PF043","label":"Red Hat"},{"code":"PF040","label":"RedHat OpenShift"}],"Version":"1.3.0\/2.5.0, 1.4.1\/3.0.1, 1.5.0\/3.5, 1.5.0\/3.5 Refresh 1 - 9, 1.7.1 - 1.7.3\/4.0 Refresh 1 - 3, 1.7.3\/4.0 Refresh 4","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
28 January 2022

UID

ibm16551744