Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1863

Add support for filtering input in TcpSocketServer and UdpSocketServer

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.1
    • Fix Version/s: 2.8.2
    • Component/s: Receivers
    • Labels:
      None

      Description

      It is best practice to add a configurable class filter to ObjectInputStream usage when input comes from untrusted sources. Add this feature to TcpSocketServer and UdpSocketServer along with sensible default settings. This feature is unnecessary in JmsServer as that relies on the underlying configuration of the JMS server (e.g., ActiveMQ has a similar configuration option).

      Security Details

      CVE-2017-5645: Apache Log4j socket receiver deserialization vulnerability
      
      Severity: High
      
      CVSS Base Score: 7.5 (AV:N/AC:L/Au:N/C:P/I:P/A:P)
      
      Vendor: The Apache Software Foundation
      
      Versions Affected: all versions from 2.0-alpha1 to 2.8.1
      
      Description: When using the TCP socket server or UDP socket server to receive serialized log events from another application, a specially crafted binary payload can be sent that, when deserialized, can execute arbitrary code.
      
      Mitigation: Java 7+ users should migrate to version 2.8.2 or avoid using the socket server classes. Java 6 users should avoid using the TCP or UDP socket server classes, or they can manually backport the security fix from 2.8.2: <https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=5dcc192>
      
      Credit: This issue was discovered by Marcio Almeida de Macedo of Red Team at Telstra
      

        Issue Links

          Activity

          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 5dcc19215827db29c993d0305ee2b0d8dd05939d in logging-log4j2's branch refs/heads/master from Matt Sicker
          [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=5dcc192 ]

          LOG4J2-1863 Add class filtering to AbstractSocketServer

          This allows a whitelist of class names to be specified to configure
          which classes are allowed to be deserialized in both TcpSocketServer and
          UdpSocketServer.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 5dcc19215827db29c993d0305ee2b0d8dd05939d in logging-log4j2's branch refs/heads/master from Matt Sicker [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=5dcc192 ] LOG4J2-1863 Add class filtering to AbstractSocketServer This allows a whitelist of class names to be specified to configure which classes are allowed to be deserialized in both TcpSocketServer and UdpSocketServer.
          Hide
          jvz Matt Sicker added a comment -

          Added to master.

          Show
          jvz Matt Sicker added a comment - Added to master.

            People

            • Assignee:
              jvz Matt Sicker
              Reporter:
              jvz Matt Sicker
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development