From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6121] Properly handle the case of SetPixelEncodings with a length of zero.
Date: Mon, 22 Dec 2008 21:06:23 +0000 [thread overview]
Message-ID: <E1LEryp-0002yP-HO@cvs.savannah.gnu.org> (raw)
Revision: 6121
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6121
Author: aliguori
Date: 2008-12-22 21:06:23 +0000 (Mon, 22 Dec 2008)
Log Message:
-----------
Properly handle the case of SetPixelEncodings with a length of zero.
This commit addresses CORE-2008-1210/CVE-2008-2382.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Modified Paths:
--------------
trunk/vnc.c
Modified: trunk/vnc.c
===================================================================
--- trunk/vnc.c 2008-12-22 20:33:55 UTC (rev 6120)
+++ trunk/vnc.c 2008-12-22 21:06:23 UTC (rev 6121)
@@ -1503,10 +1503,13 @@
if (len == 1)
return 4;
- if (len == 4)
- return 4 + (read_u16(data, 2) * 4);
+ if (len == 4) {
+ limit = read_u16(data, 2);
+ if (limit > 0)
+ return 4 + (limit * 4);
+ } else
+ limit = read_u16(data, 2);
- limit = read_u16(data, 2);
for (i = 0; i < limit; i++) {
int32_t val = read_s32(data, 4 + (i * 4));
memcpy(data + 4 + (i * 4), &val, sizeof(val));
reply other threads:[~2008-12-22 21:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1LEryp-0002yP-HO@cvs.savannah.gnu.org \
--to=anthony@codemonkey.ws \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).