Qpid
  1. Qpid
  2. QPID-2407

C++ SSL session can get bad buffer management

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.7
    • Component/s: C++ Broker, C++ Client
    • Labels:
      None
    • Environment:

      Windows

      Description

      Thanks to Cliff Jansen for alerting me to this problem.

      It's possible for an SSL-negotiated session on Windows to end up with odd errors or an exception. One session I caught in the debugger ended with a ENOBUFS errors on a network receive; the buffer involved ended up having a data-start greater than the length of the buffer, and the calculated receive length for the operation was a negative value.

      Can be reproduced using perftest on Windows; I ran against a Linux broker, but similar results can probably happen in either direction depending on the traffic pattern.

        Activity

        Hide
        Steve Huston added a comment -

        Problem happened when large chunks of coalesced SSL segments came in - sometimes the buffer obtained tohold the extra wasn't large enough; data got overrun, counts got calculated incorrectly, and odd things ensued.
        Fixed on trunk r910338.

        Show
        Steve Huston added a comment - Problem happened when large chunks of coalesced SSL segments came in - sometimes the buffer obtained tohold the extra wasn't large enough; data got overrun, counts got calculated incorrectly, and odd things ensued. Fixed on trunk r910338.

          People

          • Assignee:
            Steve Huston
            Reporter:
            Steve Huston
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development