All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Berrange <1637447@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 1637447] Re: VNC/RFB: QEMU reports incorrect name (length)
Date: Fri, 28 Oct 2016 10:00:03 -0000	[thread overview]
Message-ID: <20161028100003.16535.16049.malone@chaenomeles.canonical.com> (raw)
In-Reply-To: 20161028093031.16469.50340.malonedeb@chaenomeles.canonical.com

The right fix here is to switch to use g_strdup_printf and avoid a fixed
length stack buffer entirely.

-- 
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/v2.7.0-rc5/ui/vnc.c#L2459

  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

  parent reply	other threads:[~2016-10-28 10:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-01-11  6:29 ` Thomas Huth
2017-04-24  7:43 ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161028100003.16535.16049.malone@chaenomeles.canonical.com \
    --to=1637447@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.