Uploaded image for project: 'Guacamole'
  1. Guacamole
  2. GUACAMOLE-324

Incorrect buffer used in socket write

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.0.0
    • libguac
    • None

    Description

      Within the file descriptor implementation of guac_socket (and possibly elsewhere), the call to send() or write() uses the pointer which always points to the beginning of the buffer, rather than the pointer which is updated as chunks are written:

      https://github.com/apache/incubator-guacamole-server/blob/770a2805e4936aa73f17277a7ec6a762fdcc671a/src/libguac/socket-fd.c#L92-L118

      This will result in duplicate data being written if the first write does not succeed in writing absolutely everything, most likely resulting in invalid protocol data and a disconnect.

      Based on the fact that Guacamole works ... it seems this is rather unlikely in practice, but it should be fixed.

      Attachments

        Activity

          People

            mjumper Mike Jumper
            mjumper Mike Jumper
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: