CVE-2021-44228
CVE-2021-44228
Apache Log4j2 <=2.14.1 JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints. An attacker who can control log messages or log message parameters can execute arbitrary code loaded from LDAP servers when message lookup substitution is enabled
CVE-2021-45046
It was found that the fix to address CVE-2021-44228 in Apache Log4j 2.15.0 was incomplete in certain non-default configurations. This could allows attackers with control over Thread Context Map (MDC) input data when the logging configuration uses a non-default Pattern Layout with either a Context Lookup (for example, $${ctx:loginId}) or a Thread Context Map pattern (%X, %mdc, or %MDC) to craft malicious input data using a JNDI Lookup pattern resulting in a denial of service (DOS) attack. Log4j 2.15.0 restricts JNDI LDAP lookups to localhost by default. Note that previous mitigations involving configuration such as to set the system property `log4j2.noFormatMsgLookup` to `true` do NOT mitigate this specific vulnerability. Log4j 2.16.0 fixes this issue by removing support for message lookup patterns and disabling JNDI functionality by default. This issue can be mitigated in prior releases (<2.16.0) by removing the JndiLookup class from the classpath (example: zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class).
Service Desk Manager 17.2 and 17.3
This KB article is only applicable for :
The above two release versions (17.2.x and 17.3.x) are affected by these vulnerabilities.
To remediate these vulnerabilities,
For the 17.2.x releases:
You must follow the resolution steps provided in this KB article.
For the 17.3.x releases:
You may follow the resolution steps provided in this KB article.
(or)
You can upgrade to CA Service Management 17.3 RU11 with the upgraded Log4j2 version of 2.16.0 to fix the security vulnerabilities affecting the Apache Log4j utility. For more information on installation of CA Service Management 17.3 RU11, refer
https://techdocs.broadcom.com/us/en/ca-enterprise-software/business-management/ca-service-management/17-3/Release-Information/CA-Service-Management-17-3-0-11-Release-Notes.html
This vulnerability affects all versions of log4j from 2.0-beta9 to 2.14.1
If you have already performed the below steps, you can directly goto footer notes steps and perform those steps
Please follow below steps to implement the workaround to avoid the vulnerability:
CA Service Desk Manager is vulnerable to this CVE for the following components Promotion utility, Telemetry and AMS.
1. For the Promotion utility,
"%NX_JRE_INSTALL_DIR%/bin/java" -cp %LIB%/sdmp.jar
to
"%NX_JRE_INSTALL_DIR%/bin/java" -Dlog4j2.formatMsgNoLookups=true -cp %LIB%/sdmp.jar
"$NX_JRE_INSTALL_DIR/bin/java" -cp "${LIB}/sdmp.jar
to
"$NX_JRE_INSTALL_DIR/bin/java" -Dlog4j2.formatMsgNoLookups=true -cp "${LIB}/sdmp.jar
2. For the Telemetry,
command = "$NX_JRE_INSTALL_DIR/bin/java -Djava.net.preferIPv4Stack=false
to
command = "$NX_JRE_INSTALL_DIR/bin/java -Dlog4j2.formatMsgNoLookups=true -Djava.net.preferIPv4Stack=false
command = "$NX_JRE_INSTALL_DIR/bin/java -Djava.net.preferIPv4Stack=false
To
command = "$NX_JRE_INSTALL_DIR/bin/java -Dlog4j2.formatMsgNoLookups=true -Djava.net.preferIPv4Stack=false
3. For the AMS,
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n"/>
to
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg{nolookups}%n"/>
@NX_JAVA_OPTIONS=-Djava.net.preferIPv4Stack=false -Xms64M -Xmx1024M
to
@NX_JAVA_OPTIONS=-Djava.net.preferIPv4Stack=false -Xms64M -Xmx1024M -Dlog4j2.formatMsgNoLookups=true
4. Restart the SDM services.
The Common Installer/ Rollup Patch Installer also has the vulnerability, In order to mitigate this, prior to running the installer perform the following steps
Windows:
lax.nl.java.option.additional=-Djava.library.path=".\\java\\bin;" -DGET_SD_PRESETS=true
to
lax.nl.java.option.additional=-Djava.library.path=".\\java\\bin;" -DGET_SD_PRESETS=true -Dlog4j2.formatMsgNoLookups=true
Linux:
lax.nl.java.option.additional=-Djava.library.path="./java/bin;" -DGET_SD_PRESETS=true
to
lax.nl.java.option.additional=-Djava.library.path="./java/bin;" -DGET_SD_PRESETS=true -Dlog4j2.formatMsgNoLookups=true
Footer note : (Mandatory step)
zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
Please take a copy of updated log4j-core-*.jar file of AMS so that you can replace it if AMS.war gets exploded again. This war file gets exploded again if the original exploded AMS folder is deleted.
For The Common Installer/ Rollup Patch Installer,
zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class
If you are using Embedded Entitlements Manager (EEM), please refer to the following KB article:
https://knowledge.broadcom.com/external/article?articleId=230311
If you are using IT Process Automation (ITPAM), please refer to the following KB article:
https://knowledge.broadcom.com/external/article?articleId=230306