Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4922

Sensitive information is leaked from TTransport through a TTransportException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 0.11.0, 0.12.0
    • Fix Version/s: None
    • Component/s: Java - Library
    • Labels:
      None
    • Environment:

      Ubuntu 16.04.3 LTS
      Open JDK version "1.8.0_191" build 25.191-b12

      Description

      In org.apache.thrift.transport.TTransport,
      public int readAll(byte[] buf, int off, int len)
      throws TTransportException {
      int got = 0;
      int ret = 0;
      while (got < len) {
      ret = read(buf, off+got, len-got);
      if (ret <= 0)

      { throw new TTransportException( "Cannot read. Remote side has closed. Tried to read " + len + " bytes, but only got " + got + " bytes. (This is often indicative of an internal error on the server side. Please check your server logs.)"); }

      got += ret;
      }
      return got;
      }

      Sensitive information about expected and actual reading lengths (len, got) is leaked.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: