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

Message instances are simply serialized. They mustn't.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.8
    • Component/s: API
    • Labels:
      None

      Description

      Right now, any Message instance used to call any log method are simply sent as they are.

      Instead, the Throwable must be transformed into a ThrowableProxy. Custom Message implementations must be transformed into one of log4j's standard message implementations and care must be taken to convert the Parameters Object[] into String[] before the message is serialized.

      Otherwise, deserialization will fail if a custom Throwable, custom Message or custom parameter is not contained in the classpath of the application receiving the serialized LogEvent.

      I found those issues while implementing the circumvention for Apache Commons statement to widespread Java object de-serialisation vulnerability in Lilith.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                remkop@yahoo.com Remko Popma
                Reporter:
                huxi Joern Huxhorn
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: