]> git.pld-linux.org Git - packages/qemu.git/blame - qemu-CVE-2008-2382.patch
- fix ncurses detection; enable mixemu; enable TLS in VNC support
[packages/qemu.git] / qemu-CVE-2008-2382.patch
CommitLineData
b03c1ed8
AM
1Fix CORE-2008-1210 VNC DoS
2
3If the client sends us a limit of zero, handle appropriately.
4
5Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
6
7diff --git a/vnc.c b/vnc.c
8index 3a7d762..575fd68 100644
9--- a/vnc.c
10+++ b/vnc.c
11@@ -1503,10 +1503,13 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
12 if (len == 1)
13 return 4;
14
15- if (len == 4)
16- return 4 + (read_u16(data, 2) * 4);
17+ if (len == 4) {
18+ limit = read_u16(data, 2);
19+ if (limit > 0)
20+ return 4 + (limit * 4);
21+ } else
22+ limit = read_u16(data, 2);
23
24- limit = read_u16(data, 2);
25 for (i = 0; i < limit; i++) {
26 int32_t val = read_s32(data, 4 + (i * 4));
27 memcpy(data + 4 + (i * 4), &val, sizeof(val));
This page took 0.023426 seconds and 4 git commands to generate.