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

Thrift Server crashes when receiving specific bad packet

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.9.1, 0.9.2, 0.9.3, 0.10.0
    • None
    • C++ - Library
    • Ubuntu 12.04
      Thrift 0.9.1

    Description

      A server program with Thrift 0.9.1 always crash when receiving a specific packet from client. It's 100% reproducible by intentionally sending a packet consist of any 4 bytes followed with a 0.
      After checking the code, it is found that the crash is caused by an assert in method TNonblockingServer::TConnection::workSocket() (line 494, file TNonblockingServer.cpp). To prevent the crash, protection code can be add to check readWant_ when receiving data from client.
      The issue was found 0.9.1 and also exists in latter versions including latest code.

      Attachments

        1. THRIFT-4107.patch
          0.9 kB
          Yurong LIAO

        Activity

          People

            Unassigned Unassigned
            yurongliao Yurong LIAO
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

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