Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-616

Heap Inspection: Passwords can be revealed from heap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.6
    • None
    • IMAP
    • None

    Description

      password is used as string in src/main/java/org/apache/commons/net/imap/AuthenticatingIMAPClient.java. This should be passed as bytes and be cleaned after usage.

      Abstract:

      The method newStringUtf8() in Base64.java stores sensitive data in a String object, making it impossible to reliably purge the data from memory.

      Explanation:

      Sensitive data (such as passwords, social security numbers, credit card numbers etc) stored in memory can be leaked if memory is not cleared after use. Often, Strings are used store sensitive data, however, since String objects are immutable, removing the value of a String from memory can only be done by the JVM garbage collector. The garbage collector is not required to run unless the JVM is low on memory, so there is no guarantee as to when garbage collection will take place. In the event of an application crash, a memory dump of the application might reveal sensitive data.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dkwakkel Donald Kwakkel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: