Browse code

libsoup: Fix for CVE-2018-12910

Added a patch to fix CVE-2018-12910

Change-Id: Ie0e4a1808ff5e2afd612825bbbcdb97292cf3235
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5575
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Sharath George

Ankit Jain authored on 2018/09/04 02:11:47
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,27 @@
0
+From db2b0d5809d5f8226d47312b40992cadbcde439f Mon Sep 17 00:00:00 2001
1
+From: Michael Catanzaro <mcatanzaro@igalia.com>
2
+Date: Sun, 24 Jun 2018 19:46:19 -0500
3
+Subject: [PATCH] cookie-jar: bail if hostname is an empty string
4
+
5
+There are several other ways to fix the problem with this function, but
6
+skipping over all of the code is probably the simplest.
7
+
8
+Fixes #3
9
+---
10
+ libsoup/soup-cookie-jar.c | 2 +-
11
+ 1 file changed, 1 insertion(+), 1 deletion(-)
12
+
13
+diff --git a/libsoup/soup-cookie-jar.c b/libsoup/soup-cookie-jar.c
14
+index d12bc85..365da6a 100644
15
+--- a/libsoup/soup-cookie-jar.c
16
+@@ -306,7 +306,7 @@ get_cookies (SoupCookieJar *jar, SoupURI *uri, gboolean for_http, gboolean copy_
17
+ 
18
+ 	priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar);
19
+ 
20
+-	if (!uri->host)
21
++	if (!uri->host || !uri->host[0])
22
+ 		return NULL;
23
+ 
24
+ 	/* The logic here is a little weird, but the plan is that if
25
+--
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:    libsoup HTTP client/server library
2 2
 Name:       libsoup
3 3
 Version:    2.53.90
4
-Release:    3%{?dist}
4
+Release:    4%{?dist}
5 5
 License:    GPLv2
6 6
 URL:        http://wiki.gnome.org/LibSoup
7 7
 Group:      System Environment/Development
... ...
@@ -10,6 +10,7 @@ Distribution:   Photon
10 10
 Source0:    http://ftp.gnome.org/pub/GNOME/sources/libsoup/2.50/%{name}-%{version}.tar.xz
11 11
 %define sha1 libsoup=d8511f0a8a07e4f5125c9354be7d43d62ea55eb3
12 12
 Patch0:          CVE-2017-2885.patch
13
+Patch1:          CVE-2018-12910.patch
13 14
 BuildRequires:   glib
14 15
 BuildRequires:   glib-devel
15 16
 BuildRequires:   gobject-introspection
... ...
@@ -52,6 +53,7 @@ These are the additional language files of libsoup.
52 52
 %prep
53 53
 %setup -q
54 54
 %patch0 -p1
55
+%patch1 -p1
55 56
 
56 57
 %build
57 58
 export CFLAGS="%{optflags}"
... ...
@@ -86,6 +88,8 @@ find %{buildroot}%{_libdir} -name '*.la' -delete
86 86
 %defattr(-,root,root)
87 87
 
88 88
 %changelog
89
+*   Mon Sep 03 2018 Ankit Jain <ankitja@vmware.com> 2.53.90-4
90
+-   Fix for CVE-2018-12910
89 91
 *   Mon Jun 18 2018 Tapas Kundu <tkundu@vmware.com> 2.53.90-3
90 92
 -   CVE-2017-2885
91 93
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.53.90-2