summaryrefslogtreecommitdiffstats
path: root/patches/source/xorg-server/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-05-25 23:29:36 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 15:18:32 -0700
commit8ff4f2f51a6cf07fc33742ce3bee81328896e49b (patch)
tree4a166b8389404be98a6c098babaa444e2dec8f48 /patches/source/xorg-server/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-14.1.tar.gz
current-14.1.tar.xz
Fri May 25 23:29:36 UTC 201814.1
patches/packages/glibc-zoneinfo-2018e-noarch-2_slack14.1.txz: Rebuilt. Handle removal of US/Pacific-New timezone. If we see that the machine is using this, it will be automatically switched to US/Pacific.
Diffstat (limited to 'patches/source/xorg-server/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch')
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/patches/source/xorg-server/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch b/patches/source/xorg-server/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch
new file mode 100644
index 000000000..2034f285c
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch
@@ -0,0 +1,50 @@
+From 7909f70e73f40113608fba3ddb657c05c3276da1 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon, 6 Jan 2014 23:30:14 -0800
+Subject: [PATCH 03/31] dix: integer overflow in GetHosts() [CVE-2014-8092 2/4]
+
+GetHosts() iterates over all the hosts it has in memory, and copies
+them to a buffer. The buffer length is calculated by iterating over
+all the hosts and adding up all of their combined length. There is a
+potential integer overflow, if there are lots and lots of hosts (with
+a combined length of > ~4 gig). This should be possible by repeatedly
+calling ProcChangeHosts() on 64bit machines with enough memory.
+
+This patch caps the list at 1mb, because multi-megabyte hostname
+lists for X access control are insane.
+
+Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
+---
+ os/access.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/os/access.c b/os/access.c
+index 88a44d9..e7d668a 100644
+--- a/os/access.c
++++ b/os/access.c
+@@ -1323,6 +1323,10 @@ GetHosts(pointer *data, int *pnHosts, int *pLen, BOOL * pEnabled)
+ for (host = validhosts; host; host = host->next) {
+ nHosts++;
+ n += pad_to_int32(host->len) + sizeof(xHostEntry);
++ /* Could check for INT_MAX, but in reality having more than 1mb of
++ hostnames in the access list is ridiculous */
++ if (n >= 1048576)
++ break;
+ }
+ if (n) {
+ *data = ptr = malloc(n);
+@@ -1331,6 +1335,8 @@ GetHosts(pointer *data, int *pnHosts, int *pLen, BOOL * pEnabled)
+ }
+ for (host = validhosts; host; host = host->next) {
+ len = host->len;
++ if ((ptr + sizeof(xHostEntry) + len) > (data + n))
++ break;
+ ((xHostEntry *) ptr)->family = host->family;
+ ((xHostEntry *) ptr)->length = len;
+ ptr += sizeof(xHostEntry);
+--
+1.9.3
+