aboutsummaryrefslogtreecommitdiffstats
path: root/main/spice/CVE-2016-9577.patch
diff options
context:
space:
mode:
authorDaniel Sabogal <dsabogalcc@gmail.com>2017-06-29 21:26:48 -0400
committerTimo Teräs <timo.teras@iki.fi>2017-07-07 10:54:11 +0000
commitfd25bfb17d1088c7818aa9ca87b159102546682c (patch)
treefa91464fbcfebae8c540d16e3e07afef80b90c2d /main/spice/CVE-2016-9577.patch
parentea69d40776bd4e8258d8a996d3f54733fef9b70b (diff)
downloadaports-fd25bfb17d1088c7818aa9ca87b159102546682c.tar.bz2
aports-fd25bfb17d1088c7818aa9ca87b159102546682c.tar.xz
main/spice: security fixes (CVE-2016-9577, CVE-2016-9578)
Diffstat (limited to 'main/spice/CVE-2016-9577.patch')
-rw-r--r--main/spice/CVE-2016-9577.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/spice/CVE-2016-9577.patch b/main/spice/CVE-2016-9577.patch
new file mode 100644
index 0000000000..0d0a9ae4b1
--- /dev/null
+++ b/main/spice/CVE-2016-9577.patch
@@ -0,0 +1,28 @@
+From 5f96b596353d73bdf4bb3cd2de61e48a7fd5b4c3 Mon Sep 17 00:00:00 2001
+From: Frediano Ziglio <fziglio@redhat.com>
+Date: Tue, 29 Nov 2016 16:46:56 +0000
+Subject: [PATCH] main-channel: Prevent overflow reading messages from client
+
+Caller is supposed the function return a buffer able to store
+size bytes.
+
+Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
+Acked-by: Christophe Fergeau <cfergeau@redhat.com>
+---
+ server/main_channel.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/server/main_channel.c b/server/main_channel.c
+index 0ecc9df8..1fc39155 100644
+--- a/server/main_channel.c
++++ b/server/main_channel.c
+@@ -1026,6 +1026,9 @@ static uint8_t *main_channel_alloc_msg_rcv_buf(RedChannelClient *rcc,
+
+ if (type == SPICE_MSGC_MAIN_AGENT_DATA) {
+ return reds_get_agent_data_buffer(mcc, size);
++ } else if (size > sizeof(main_chan->recv_buf)) {
++ /* message too large, caller will log a message and close the connection */
++ return NULL;
+ } else {
+ return main_chan->recv_buf;
+ }