All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1637447] [NEW] VNC/RFB: QEMU reports incorrect name (length)
@ 2016-10-28  9:30 cardamon
  2016-10-28  9:57 ` [Qemu-devel] [Bug 1637447] " Jakob van Kruijssen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: cardamon @ 2016-10-28  9:30 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

If the name of a machine (as set with the -name argument) has a length
longer than 1024, (RFB) VNC clients will not receive a correct RFB
ServerInit message.

I suspect this is the problem:

https://github.com/qemu/qemu/blob/master/ui/vnc.c#L2463

The return value of snprintf is used as the value for the name-length field in the ServerInit message.
This is problematic for names that were truncated to 1024, as the length will now be bigger than the actual name.

I think a quick fix would be to simply report min(size,1024) to the
client...

** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: rfb vnc

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1637447

Title:
  VNC/RFB: QEMU reports incorrect name (length)

Status in QEMU:
  New

Bug description:
  If the name of a machine (as set with the -name argument) has a length
  longer than 1024, (RFB) VNC clients will not receive a correct RFB
  ServerInit message.

  I suspect this is the problem:

  https://github.com/qemu/qemu/blob/master/ui/vnc.c#L2463

  The return value of snprintf is used as the value for the name-length field in the ServerInit message.
  This is problematic for names that were truncated to 1024, as the length will now be bigger than the actual name.

  I think a quick fix would be to simply report min(size,1024) to the
  client...

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1637447/+subscriptions

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-24  7:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28  9:30 [Qemu-devel] [Bug 1637447] [NEW] VNC/RFB: QEMU reports incorrect name (length) cardamon
2016-10-28  9:57 ` [Qemu-devel] [Bug 1637447] " Jakob van Kruijssen
2016-10-28 10:00 ` Daniel Berrange
2017-01-11  6:29 ` Thomas Huth
2017-04-24  7:43 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.