Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-3504

An information leakage from FileTxnSnapLog to log:

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.4.11, 3.4.12, 3.4.13, 3.5.5, 3.4.14
    • Fix Version/s: None
    • Component/s: security, server
    • Labels:
      None

      Description

      In org.apache.zookeeper.server.persistence.FileTxnSnapLog, the statement LOG.debug don't have LOG controls:
      public void processTransaction(TxnHeader hdr,DataTree dt,
      Map<Long, Integer> sessions, Record txn)
      throws KeeperException.NoNodeException {
      ......
      if (rc.err != Code.OK.intValue())

      { LOG.debug("Ignoring processTxn failure hdr:" + hdr.getType() + ", error: " + rc.err + ", path: " + rc.path); }


      ......
      }

      Sensitive information about hdr type or rc path was leaked. The conditional statement LOG.isDebugEnabled() should be added:
      public void processTransaction(TxnHeader hdr,DataTree dt,
      Map<Long, Integer> sessions, Record txn)
      throws KeeperException.NoNodeException {
      ......
      if (rc.err != Code.OK.intValue())

      { if (LOG.isDebugEnabled()) LOG.debug("Ignoring processTxn failure hdr:" + hdr.getType() + ", error: " + rc.err + ", path: " + rc.path); }


      ......
      }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              xiaoqin.fu xiaoqin.fu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: