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

Cursor Improperly Initialized when Connecting to Gnome Remote Desktop via RDP

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4.0
    • 1.5.2
    • RDP
    • None

    Description

      When connecting to a Gnome Remote Desktop RDP instance the mouse cursor is created but the image data is never copied into the cursor's pixel buffer resulting in a garbled bitmap containing uninitialized data:

      This appears to happen because of this guard condition in src/protocols/rdp/pointer.c (line 49):

      if (pointer->andMaskData && pointer->xorMaskData) 

       

      It appears when Gnome Remote Desktop initializes cursors when starting the session it sets `andMaskData` to NULL with a length of zero:

            pointer_color->lengthAndMask = 0;
            pointer_color->lengthXorMask = xor_mask_length;
            pointer_color->andMaskData = NULL; 

      This causes the guard condition in the RDP plugin to fail to copy bitmap data from the server. It appears as if FreeRDP correctly handles the image data in freerdp_image_copy_from_pointer_data() if lengthAndMask == 0:

          if (andMask)
          {
              if (andStep * nHeight > andMaskLength)
                  return FALSE;
          }

      I believe this guard condition is probably not necessary; removing it resolves the issue for me. I tested against both Gnome Remote Desktop and a Windows 11 Professional instance.

      Please let me know if you'd like any additional information or testing done. This was tested with Guacamole 1.4.0 from Docker Hub (guacamole/guacamole:1.4.0 and guacamole/guacd:1.4.0). Testing against a fresh install of Fedora 37/Gnome 43.

      Attachments

        Issue Links

          Activity

            People

              mjumper Mike Jumper
              powers Mike Powers
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: