You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2021/12/20 15:33:20 UTC

[logging-log4j2] branch log4j-2.3.x created (now 6f0c11e)

This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a change to branch log4j-2.3.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.


      at 6f0c11e  [DOC] Update log4j-2.3.x About page to mention security vulns and point to security page

This branch includes the following new commits:

     new a0b0e11  Create branch for security releases
     new be848da  LOG4J2-3198 - Remove ability to perform lookups from message text
     new 6f0c11e  [DOC] Update log4j-2.3.x About page to mention security vulns and point to security page

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[logging-log4j2] 01/03: Create branch for security releases

Posted by rg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch log4j-2.3.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit a0b0e1149714272cc9a37d70ad7f8808ebc55f70
Author: rgoers <ra...@dslextreme.com>
AuthorDate: Sun Dec 19 22:43:43 2021 -0700

    Create branch for security releases
---
 log4j-1.2-api/pom.xml                | 2 +-
 log4j-api/pom.xml                    | 2 +-
 log4j-core/pom.xml                   | 2 +-
 log4j-distribution/pom.xml           | 2 +-
 log4j-flume-ng/pom.xml               | 2 +-
 log4j-iostreams/pom.xml              | 2 +-
 log4j-jcl/pom.xml                    | 2 +-
 log4j-jmx-gui/pom.xml                | 2 +-
 log4j-jul/pom.xml                    | 2 +-
 log4j-nosql/pom.xml                  | 2 +-
 log4j-perf/pom.xml                   | 2 +-
 log4j-samples/flume-common/pom.xml   | 2 +-
 log4j-samples/flume-embedded/pom.xml | 2 +-
 log4j-samples/flume-remote/pom.xml   | 2 +-
 log4j-samples/pom.xml                | 2 +-
 log4j-slf4j-impl/pom.xml             | 2 +-
 log4j-taglib/pom.xml                 | 2 +-
 log4j-to-slf4j/pom.xml               | 2 +-
 log4j-web/pom.xml                    | 2 +-
 pom.xml                              | 2 +-
 20 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/log4j-1.2-api/pom.xml b/log4j-1.2-api/pom.xml
index bc149a2..971cd11 100644
--- a/log4j-1.2-api/pom.xml
+++ b/log4j-1.2-api/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-1.2-api</artifactId>
diff --git a/log4j-api/pom.xml b/log4j-api/pom.xml
index 7f70f39..4748b3f 100644
--- a/log4j-api/pom.xml
+++ b/log4j-api/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-api</artifactId>
diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml
index f66719f..f3acfd3 100644
--- a/log4j-core/pom.xml
+++ b/log4j-core/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-core</artifactId>
diff --git a/log4j-distribution/pom.xml b/log4j-distribution/pom.xml
index abc1381..22906fc 100644
--- a/log4j-distribution/pom.xml
+++ b/log4j-distribution/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-distribution</artifactId>
diff --git a/log4j-flume-ng/pom.xml b/log4j-flume-ng/pom.xml
index 83cd968..92f8fa5 100644
--- a/log4j-flume-ng/pom.xml
+++ b/log4j-flume-ng/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-flume-ng</artifactId>
diff --git a/log4j-iostreams/pom.xml b/log4j-iostreams/pom.xml
index 1e190b7..dd3e4f1 100644
--- a/log4j-iostreams/pom.xml
+++ b/log4j-iostreams/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-iostreams</artifactId>
diff --git a/log4j-jcl/pom.xml b/log4j-jcl/pom.xml
index 9021464..9c711b8 100644
--- a/log4j-jcl/pom.xml
+++ b/log4j-jcl/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-jcl</artifactId>
diff --git a/log4j-jmx-gui/pom.xml b/log4j-jmx-gui/pom.xml
index eb185b8..f2794b9 100644
--- a/log4j-jmx-gui/pom.xml
+++ b/log4j-jmx-gui/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-jmx-gui</artifactId>
diff --git a/log4j-jul/pom.xml b/log4j-jul/pom.xml
index 0d06859..6e17f40 100644
--- a/log4j-jul/pom.xml
+++ b/log4j-jul/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j</artifactId>
     <groupId>org.apache.logging.log4j</groupId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <modelVersion>4.0.0</modelVersion>
diff --git a/log4j-nosql/pom.xml b/log4j-nosql/pom.xml
index 7ebf9a7..83a4417 100644
--- a/log4j-nosql/pom.xml
+++ b/log4j-nosql/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j</artifactId>
     <groupId>org.apache.logging.log4j</groupId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
diff --git a/log4j-perf/pom.xml b/log4j-perf/pom.xml
index 70b9a53..55bdcd0 100644
--- a/log4j-perf/pom.xml
+++ b/log4j-perf/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j</artifactId>
     <groupId>org.apache.logging.log4j</groupId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
 
diff --git a/log4j-samples/flume-common/pom.xml b/log4j-samples/flume-common/pom.xml
index 78262e1..e767c21 100644
--- a/log4j-samples/flume-common/pom.xml
+++ b/log4j-samples/flume-common/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
   </parent>
   <artifactId>log4j-samples-flume-common</artifactId>
   <packaging>jar</packaging>
diff --git a/log4j-samples/flume-embedded/pom.xml b/log4j-samples/flume-embedded/pom.xml
index eb76b7f..78bbd37 100644
--- a/log4j-samples/flume-embedded/pom.xml
+++ b/log4j-samples/flume-embedded/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
   </parent>
   <artifactId>log4j-samples-flume-embedded</artifactId>
   <packaging>war</packaging>
diff --git a/log4j-samples/flume-remote/pom.xml b/log4j-samples/flume-remote/pom.xml
index e2dc911..9dec973 100644
--- a/log4j-samples/flume-remote/pom.xml
+++ b/log4j-samples/flume-remote/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j-samples</artifactId>
     <groupId>org.apache.logging.log4j.samples</groupId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
   </parent>
   <artifactId>log4j-samples-flume-remote</artifactId>
   <packaging>war</packaging>
diff --git a/log4j-samples/pom.xml b/log4j-samples/pom.xml
index 1152b21..ba92a25 100644
--- a/log4j-samples/pom.xml
+++ b/log4j-samples/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <groupId>org.apache.logging.log4j.samples</groupId>
diff --git a/log4j-slf4j-impl/pom.xml b/log4j-slf4j-impl/pom.xml
index e55143b..de8caa0 100644
--- a/log4j-slf4j-impl/pom.xml
+++ b/log4j-slf4j-impl/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-slf4j-impl</artifactId>
diff --git a/log4j-taglib/pom.xml b/log4j-taglib/pom.xml
index 7bd5010..4da58e0 100644
--- a/log4j-taglib/pom.xml
+++ b/log4j-taglib/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-taglib</artifactId>
diff --git a/log4j-to-slf4j/pom.xml b/log4j-to-slf4j/pom.xml
index 5261949..b324aa6 100644
--- a/log4j-to-slf4j/pom.xml
+++ b/log4j-to-slf4j/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j</artifactId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
     <relativePath>../</relativePath>
   </parent>
   <artifactId>log4j-to-slf4j</artifactId>
diff --git a/log4j-web/pom.xml b/log4j-web/pom.xml
index b65533e..35fb3e4 100644
--- a/log4j-web/pom.xml
+++ b/log4j-web/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>log4j</artifactId>
     <groupId>org.apache.logging.log4j</groupId>
-    <version>2.3</version>
+    <version>2.3.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 
diff --git a/pom.xml b/pom.xml
index 3b9f3c0..5417010 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
   <artifactId>log4j</artifactId>
   <packaging>pom</packaging>
   <name>Apache Log4j 2</name>
-  <version>2.3</version>
+  <version>2.3.1-SNAPSHOT</version>
   <parent>
     <groupId>org.apache</groupId>
     <artifactId>apache</artifactId>

[logging-log4j2] 03/03: [DOC] Update log4j-2.3.x About page to mention security vulns and point to security page

Posted by rg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch log4j-2.3.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 6f0c11e3baafe9c724e73d44f7d440efb3e491ba
Author: rpopma <rp...@apache.org>
AuthorDate: Mon Dec 20 17:23:15 2021 +0900

    [DOC] Update log4j-2.3.x About page to mention security vulns and point to security page
---
 src/site/xdoc/index.xml | 66 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 65 insertions(+), 1 deletion(-)

diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index 2d40323..b3e8f3f 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -27,7 +27,71 @@
     </properties>
 
     <body>
-        <section name="Apache Log4j 2">
+
+      <a name="CVE-2021-45105"/>
+      <h2>Important: Security Vulnerabilities CVE-2021-45105, CVE-2021-45046 and CVE-2021-44228</h2>
+
+      <p>The Log4j team has been made aware of multiple security vulnerabilities, CVE-2021-45105, CVE-2021-45046 and CVE-2021-44228,
+        that have been addressed in Log4j 2.3.1 for Java 6.
+        The same vulnerabilities have been addressed in Log4j 2.12.3 for Java 7, and in
+        Log4j 2.17.0 for Java 8 and up.</p>
+
+      <h3>CVE-2021-45105</h3>
+      <p>Summary: Apache Log4j2 does not always protect from infinite recursion in lookup evaluation.</p>
+
+      <h4>Details</h4>
+      <p>Apache Log4j2 versions 2.0-alpha1 through 2.16.0 did not protect from uncontrolled recursion from self-referential lookups.
+        When the logging configuration uses a non-default Pattern Layout with a Context Lookup (for example, <code>$${ctx:loginId}</code>),
+        attackers with control over Thread Context Map (MDC) input data can craft malicious input data that contains a recursive lookup,
+        resulting in a StackOverflowError that will terminate the process. This is also known as a DOS (Denial of Service) attack.</p>
+
+      <h4>Mitigation</h4>
+      <p>Upgrade to Log4j 2.3.1 (for Java 6), 2.12.3 (for Java 7), or 2.17.0 (for Java 8).</p>
+
+      <h4>Reference</h4>
+      <p>Please refer to the <a href="https://logging.apache.org/log4j/2.x/security.html#CVE-2021-45105">Security page</a> for details and mitigation measures for older versions of Log4j.</p>
+
+
+      <a name="CVE-2021-45046"/>
+      <h3>CVE-2021-45046</h3>
+
+      <p>Summary: Apache Log4j2 Thread Context Lookup Pattern vulnerable to remote code execution in certain non-default configurations.</p>
+
+      <h4>Details</h4>
+      <p>It was found that the fix to address CVE-2021-44228 in Apache Log4j 2.15.0 was incomplete in certain non-default configurations.
+        When the logging configuration uses a non-default Pattern Layout with a Context Lookup (for example, <code>$${ctx:loginId}</code>),
+        attackers with control over Thread Context Map (MDC) input data can craft malicious input data using a JNDI Lookup pattern,
+        resulting in an information leak and remote code execution in some environments and local code execution in all environments;
+        remote code execution has been demonstrated on macOS but no other tested environments.</p>
+
+      <h4>Mitigation</h4>
+      <p>Upgrade to Log4j 2.3.1 (for Java 6), 2.12.3 (for Java 7), or 2.17.0 (for Java 8).</p>
+
+      <h4>Reference</h4>
+      <p>Please refer to the <a href="https://logging.apache.org/log4j/2.x/security.html#CVE-2021-45105">Security page</a> for details and mitigation measures for older versions of Log4j.</p>
+
+
+      <a name="CVE-2021-44228"/>
+      <h3>CVE-2021-44228</h3>
+
+      <p>Summary:
+        Log4j’s JNDI support has not restricted what names could be resolved. Some protocols are unsafe or can allow remote code
+        execution.</p>
+
+      <h4>Details</h4>
+      <p>One vector that allowed exposure to this vulnerability was Log4j’s allowance of Lookups to appear in log messages.
+        This meant that when user input is logged, and that user input contained a JNDI Lookup pointing to a malicious server,
+        then Log4j would resolve that JNDI Lookup, connect to that server, and potentially download serialized Java code from
+        that remote server. This in turn could execute any code during deserialization.
+        This is known as a RCE (Remote Code Execution) attack.</p>
+
+      <h4>Mitigation</h4>
+      <p>Upgrade to Log4j 2.3.1 (for Java 6), 2.12.3 (for Java 7), or 2.17.0 (for Java 8).</p>
+
+      <h4>Reference</h4>
+      <p>Please refer to the <a href="https://logging.apache.org/log4j/2.x/security.html#CVE-2021-45105">Security page</a> for details and mitigation measures for older versions of Log4j.</p>
+
+      <section name="Apache Log4j 2">
 
           <p>
             Apache Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j

[logging-log4j2] 02/03: LOG4J2-3198 - Remove ability to perform lookups from message text

Posted by rg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch log4j-2.3.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit be848dacbac6df30c4f32b2852e24446033ecf79
Author: rgoers <ra...@dslextreme.com>
AuthorDate: Sun Dec 19 23:30:42 2021 -0700

    LOG4J2-3198 - Remove ability to perform lookups from message text
---
 .../apache/logging/log4j/core/pattern/MessagePatternConverter.java   | 3 +--
 .../org/apache/logging/log4j/core/pattern/RegexReplacementTest.java  | 2 +-
 src/changes/changes.xml                                              | 5 +++++
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java
index d0adc7f..3050720 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/MessagePatternConverter.java
@@ -68,8 +68,7 @@ public final class MessagePatternConverter extends LogEventPatternConverter {
                 result = msg.getFormattedMessage();
             }
             if (result != null) {
-                toAppendTo.append(config != null && result.contains("${") ?
-                    config.getStrSubstitutor().replace(event, result) : result);
+                toAppendTo.append(result);
             } else {
                 toAppendTo.append("null");
             }
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/RegexReplacementTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/RegexReplacementTest.java
index 94fcfdf..e9d9862 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/RegexReplacementTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/RegexReplacementTest.java
@@ -70,7 +70,7 @@ public class RegexReplacementTest {
         msgs = app.getMessages();
         assertNotNull(msgs);
         assertEquals("Incorrect number of messages. Should be 1 is " + msgs.size(), 1, msgs.size());
-        assertEquals("LoggerTest This is a test for Apache" + Constants.LINE_SEPARATOR, msgs.get(0));
+        assertEquals("LoggerTest This is a test for ${ctx:MyKey}" + Constants.LINE_SEPARATOR, msgs.get(0));
     }
      @Test
     public void testConverter() {
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 693c46d..7d6508e 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -23,6 +23,11 @@
     <title>Changes</title>
   </properties>
   <body>
+    <release version="2.3.1" date="2021-12-xx" description="GA Release 2.3.1">
+      <action issue="LOG4J2-3198" dev="rgoers" type="add">
+        Pattern layout no longer enables lookups within message text.
+      </action>
+    </release>
     <release version="2.3" date="2015-05-09" description="GA Release 2.3">
       <action issue="LOG4J2-1009" dev="ggregory" type="fix" due-to="Mikael Ståldal">
         Incorrectly defined compressionType parameter to GelfLayout.