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

Allow setting a maximum frame size in TFramedTransport

    XMLWordPrintableJSON

Details

    • Patch Available

    Description

      To secure Thrift servers against malicious attacks or corrupted data, an often requested feature is to limit the maximum size of a frame at receive. TNonblockingServer already has such a feature. The attached patch imposes a maximum frame size in TFramedTransport. The default value is very conservative (1MiB), to make sure that memory cannot be easily exhausted. The user can then increase the maximum frame size, as required.

      Example usage:

      Good Client -> Server: I want to send you a 100MiB file;
      Server -> Good Client: Maximum frame size adjusted go ahead;
      Good Client -> Server: Here comes the file ...

      Bad Client -> Server: Here is a 100MiB frame to exhaust your memory;
      Server -> Bad Client: [connection dropped]

      Attachments

        Activity

          People

            roger Roger Meier
            cklein Cristian Klein
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified