aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/spice-CVE-2016-9578-2.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-9578-2.patch
parentdcb550e5994de3bf72d196de8f237b758535bf67 (diff)
downloadguix-ae953ead0faf115e5d16f15b48a3c2316228a8f7.tar
guix-ae953ead0faf115e5d16f15b48a3c2316228a8f7.tar.gz
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-9578-2.patch')
-rw-r--r--gnu/packages/patches/spice-CVE-2016-9578-2.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/patches/spice-CVE-2016-9578-2.patch b/gnu/packages/patches/spice-CVE-2016-9578-2.patch
new file mode 100644
index 0000000000..76f7ec7ffb
--- /dev/null
+++ b/gnu/packages/patches/spice-CVE-2016-9578-2.patch
@@ -0,0 +1,38 @@
+Fixes a potential buffer overflow in the protocol handling.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1399566
+https://access.redhat.com/security/cve/CVE-2016-9578
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9578
+https://security-tracker.debian.org/tracker/CVE-2016-9578
+
+Patch copied from upstream source repository:
+
+https://cgit.freedesktop.org/spice/spice/commit/?h=0.12&id=f66dc643635518e53dfbe5262f814a64eec54e4a
+
+From f66dc643635518e53dfbe5262f814a64eec54e4a Mon Sep 17 00:00:00 2001
+From: Frediano Ziglio <fziglio@redhat.com>
+Date: Tue, 13 Dec 2016 14:40:10 +0000
+Subject: Prevent integer overflows in capability checks
+
+diff --git a/server/reds.c b/server/reds.c
+index 86a33d5..9150454 100644
+--- a/server/reds.c
++++ b/server/reds.c
+@@ -2110,6 +2110,14 @@ static void reds_handle_read_link_done(void *opaque)
+ link_mess->num_channel_caps = GUINT32_FROM_LE(link_mess->num_channel_caps);
+ link_mess->num_common_caps = GUINT32_FROM_LE(link_mess->num_common_caps);
+
++ /* Prevent DoS. Currently we defined only 13 capabilities,
++ * I expect 1024 to be valid for quite a lot time */
++ if (link_mess->num_channel_caps > 1024 || link_mess->num_common_caps > 1024) {
++ reds_send_link_error(link, SPICE_LINK_ERR_INVALID_DATA);
++ reds_link_free(link);
++ return;
++ }
++
+ num_caps = link_mess->num_common_caps + link_mess->num_channel_caps;
+ caps = (uint32_t *)((uint8_t *)link_mess + link_mess->caps_offset);
+
+--
+cgit v0.10.2
+