summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/spice-CVE-2016-9577.patch
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-02-11 19:12:10 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-02-11 20:12:41 +0100
commitae953ead0faf115e5d16f15b48a3c2316228a8f7 (patch)
treee7cf8a2ce68ffa6a02de5aff82e44e50cae1f254 /gnu/packages/patches/spice-CVE-2016-9577.patch
parentdcb550e5994de3bf72d196de8f237b758535bf67 (diff)
gnu: spice: Fix CVE-2016-9577 and CVE-2016-9578.
* gnu/packages/patches/spice-CVE-2016-9577.patch, gnu/packages/patches/spice-CVE-2016-9578-1.patch, gnu/packages/patches/spice-CVE-2016-9578-2.patch: New files. * gnu/local.mk (dist_patch_DATA): Register them. * gnu/packages/spice.scm (spice)[source]: Use them.
Diffstat (limited to 'gnu/packages/patches/spice-CVE-2016-9577.patch')
-rw-r--r--gnu/packages/patches/spice-CVE-2016-9577.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/packages/patches/spice-CVE-2016-9577.patch b/gnu/packages/patches/spice-CVE-2016-9577.patch
new file mode 100644
index 0000000000..a2cb558cd3
--- /dev/null
+++ b/gnu/packages/patches/spice-CVE-2016-9577.patch
@@ -0,0 +1,33 @@
+Prevent buffer overflow when reading large messages.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1401603
+https://access.redhat.com/security/cve/CVE-2016-9577
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9577
+https://security-tracker.debian.org/tracker/CVE-2016-9577
+
+Patch copied from upstream source repository:
+
+https://cgit.freedesktop.org/spice/spice/commit/?h=0.12&id=5f96b596353d73bdf4bb3cd2de61e48a7fd5b4c3
+
+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: main-channel: Prevent overflow reading messages from client
+
+diff --git a/server/main_channel.c b/server/main_channel.c
+index 0ecc9df..1fc3915 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;
+ }
+--
+cgit v0.10.2
+