Vinagre closes connection to tightvncserver 2.0 beta4 immediately

Bug #598597 reported by mmayer
66
This bug affects 10 people
Affects Status Importance Assigned to Milestone
gtk-vnc (Ubuntu)
Fix Released
Medium
Unassigned
Lucid
Fix Released
Low
Unassigned

Bug Description

===============================
SRU Justification:
1. Impact: vinagre fails to connect to tightvncserver
2. How bug was addressed: a one-line (one-character) fix was pulled from upstream which fixes the initial protocol greeting to include a newline (it was a NULL)
3. Minimal patch: see attached gtk-vnc.debdiff
4. TEST CASE: start tightvncserver, then try to connect to it with vinagre
5. Regression potential: It could break connections from/to other vnc clients/servers. Connections should be tested between all, including 'kvm -vnc'.

Binary package hint: vinagre

Ubuntu 10.04 (Lucid), Vinagre 2.30.2-0ubuntu1
When I connect to a TightVNC-Server 2.0 beta4 the conntection closes immediately with
"Connection to host <ip> was closed."
Other VNC-Viewers are working without a problem.

SRU Justification:
Bug prevents gtk-vnc based clients from working with upcoming tightvncserver releases.

Risk of regression:
Low, patch is a one-line change from upstream only affecting the version string sent in response to the server.

Testcase:
1) Install tightvncserver v2 (not yet in Ubuntu or Debian repositories, alas)
2) start tightvncserver session
3) connect to it with vinagre or another gtk-vnc client; client should attach successfully.

Revision history for this message
xplod (xplod83) wrote :

Binary package hint: vinagre

Ubuntu 10.04 (Lucid), Vinagre 2.30.2-0ubuntu1

Similar to the Problem of TightVNC-Server 2.0 Release in the log file TightVNC-Server says "Invalid format of the RFB version message".
Using Remmina xtightvncviewer and everything works.

Revision history for this message
mccurly (mccurly) wrote :

today i sniffed the traffic and compared the handshake from tsclient and vinagre.
the handshake from vinagre seems not to work as specified in the rfb protocol.
see: http://datatracker.ietf.org/doc/draft-levine-rfb/

summarized protocol v.3.8 handshake:
server tells highest protocol version on connection: "RFB 003.008\n" (hex 52 46 42 20 30 30 33 2e 30 30 38 0a)
client tells it version, too: "RFB 003.008\n" (hex 52 46 42 20 30 30 33 2e 30 30 38 0a)

but vinagres reply to the server is "RFB 003.008 " (hex 52 46 42 20 30 30 33 2e 30 30 38 00)

the end of the string differs from vinagre (hex: 00) and tsclient (hex: 0a).

v1.x servers of tightvnc just seem to take the rfb-string "RFB 003.008" without newline at the end.
v2.x servers of tightvnc seem to read all of the reply, includeing the last character

that's why, i guess, the server logs "Invalid format of the RFB version message"

maybe thats the point.

someone has to investigate this.

tested on:
lucid:
tsclient: 0.150
vinagre: 2.30.2
winxp pro sp3:
tightvnc-server 1.3.10
tightvnc-server 2.0.2

Revision history for this message
Jonh Wendell (wendell) wrote :
Revision history for this message
mccurly (mccurly) wrote :

thanks for the hint!
i managed to modify the original ubuntu package (gtk-vnc_0.3.10.orig.tar.gz) and test it. works out for me, now.
i am not really familiar to packageing, but here are the lines i changed to get it work. hope this helps.

summary: - Vinage closes connection to tightvncserver 2.0 beta4 immediately
+ Vinagre closes connection to tightvncserver 2.0 beta4 immediately
Revision history for this message
Tom Henderson (tomhenderson) wrote :

I notice that a fix was identified some time ago, but I don't see where this has been added to the current or any future releases of vinagre. Are there any plans to include this fix in a package?

Revision history for this message
Anand Kumria (wildfire) wrote :

This is an off-by-one snprintf fix; I think this warrants being backported to Ubuntu 10.04 LTS (Lucid)

Revision history for this message
Anand Kumria (wildfire) wrote :

In Lucid's case the file is src/gvnc.c but I can confirm it works when gtk-vnc is rebuilt.

Changed in vinagre (Ubuntu):
status: New → Confirmed
Revision history for this message
Steve Beattie (sbeattie) wrote :

Correcting the package this bug is against from vinagre to gtk-vnc, since that's where the underlying problem is. Attached is a debdiff based on the diffs pointed out by Josh Wendell and mccurrly above for a lucid SRU.

Changed in vinagre (Ubuntu):
importance: Undecided → Medium
affects: vinagre (Ubuntu) → gtk-vnc (Ubuntu)
Steve Beattie (sbeattie)
description: updated
Changed in gtk-vnc (Ubuntu):
status: Confirmed → Fix Released
status: Fix Released → In Progress
assignee: nobody → Serge Hallyn (serge-hallyn)
description: updated
Revision history for this message
Dave Walker (davewalker) wrote :

Uploaded debdiff from comment #8, awaiting SRU approval.

Changed in gtk-vnc (Ubuntu Lucid):
status: New → Fix Committed
importance: Undecided → Low
Changed in gtk-vnc (Ubuntu):
assignee: Serge Hallyn (serge-hallyn) → nobody
Revision history for this message
Martin Pitt (pitti) wrote :

I verified that the fix is in oneiric.

Changed in gtk-vnc (Ubuntu):
status: In Progress → Fix Released
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello mmayer, or anyone else affected,

Accepted gtk-vnc into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Anand Kumria (wildfire) wrote :

Confirming that this works against tightvnc servers (running Windows XP / Windows Vista / Windows 7) - which is what I tested against.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk-vnc - 0.3.10-2ubuntu2.1

---------------
gtk-vnc (0.3.10-2ubuntu2.1) lucid-proposed; urgency=low

  * Fix off-by-one error in snprintf call generating the version
    string, thanks to Josh Wendell and mccurlly for identifying the
    fix (LP: #598597)
    - add debian/patches/0006-fix-snprintf-off-by-1-lp598597.patch
    - update debian/patches/series
 -- Steve Beattie <email address hidden> Mon, 15 Aug 2011 11:31:15 -0700

Changed in gtk-vnc (Ubuntu Lucid):
status: Fix Committed → Fix Released
tags: added: testcase
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.