Page MenuHomeFreeBSD

D9908.id26031.diff
No OneTemporary

D9908.id26031.diff

Index: devel/kf5-kio/Makefile
===================================================================
--- devel/kf5-kio/Makefile
+++ devel/kf5-kio/Makefile
@@ -3,6 +3,7 @@
PORTNAME= kio
PORTVERSION= ${KDE_FRAMEWORKS_VERSION}
+PORTREVISION= 1
CATEGORIES= devel kde kde-frameworks
MAINTAINER= kde@FreeBSD.org
Index: devel/kf5-kio/files/patch-git_f9d0cb4_cve-2017-6410
===================================================================
--- /dev/null
+++ devel/kf5-kio/files/patch-git_f9d0cb4_cve-2017-6410
@@ -0,0 +1,43 @@
+From f9d0cb47cf94e209f6171ac0e8d774e68156a6e4 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Tue, 28 Feb 2017 19:00:48 +0100
+Subject: [PATCH] Sanitize URLs before passing them to FindProxyForURL
+
+Remove user/password information
+For https: remove path and query
+
+Thanks to safebreach.com for reporting the problem
+
+CCMAIL: yoni.fridburg@safebreach.com
+CCMAIL: amit.klein@safebreach.com
+CCMAIL: itzik.kotler@safebreach.com
+---
+ src/kpac/script.cpp | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/src/kpac/script.cpp b/src/kpac/script.cpp
+index a0235f73..2485c54d 100644
+--- src/kpac/script.cpp
++++ src/kpac/script.cpp
+@@ -754,9 +754,16 @@ QString Script::evaluate(const QUrl &url)
+ }
+ }
+
++ QUrl cleanUrl = url;
++ cleanUrl.setUserInfo(QString());
++ if (cleanUrl.scheme() == QLatin1String("https")) {
++ cleanUrl.setPath(QString());
++ cleanUrl.setQuery(QString());
++ }
++
+ QScriptValueList args;
+- args << url.url();
+- args << url.host();
++ args << cleanUrl.url();
++ args << cleanUrl.host();
+
+ QScriptValue result = func.call(QScriptValue(), args);
+ if (result.isError()) {
+--
+2.11.1
+
Index: security/vuxml/vuln.xml
===================================================================
--- security/vuxml/vuln.xml
+++ security/vuxml/vuln.xml
@@ -58,6 +58,44 @@
* Do not forget port variants (linux-f10-libxml2, libxml2, etc.)
-->
<vuxml xmlns="http://www.vuxml.org/apps/vuxml-1">
+ <vuln vid="f714d8ab-028e-11e7-8042-50e549ebab6c">
+ <topic>kio: Information Leak when accessing https when using a malicious PAC file</topic>
+ <affects>
+ <package>
+ <name>kdelibs4</name>
+ <range><lt>kdelibs-4.14.29_1</lt></range>
+ </package>
+ <package>
+ <name>kf5-kio</name>
+ <range><lt>5.31.0_1</lt></range>
+ </package>
+ </affects>
+ <description>
+ <body xmlns="http://www.w3.org/1999/xhtml">
+ <p>Albert Astals Cid reports:</p>
+ <blockquote cite="https://www.kde.org/info/security/advisory-20170228-1.txt">
+ <p>Using a malicious PAC file, and then using exfiltration methods in the PAC
+ function FindProxyForURL() enables the attacker to expose full https URLs.</p>
+ <p>This is a security issue since https URLs may contain sensitive
+ information in the URL authentication part (user:password@host), and in the
+ path and the query (e.g. access tokens).</p>
+ <p>This attack can be carried out remotely (over the LAN) since proxy settings
+ allow "Detect Proxy Configuration Automatically".
+ This setting uses WPAD to retrieve the PAC file, and an attacker who has access
+ to the victim's LAN can interfere with the WPAD protocols (DHCP/DNS+HTTP)
+ and inject his/her own malicious PAC instead of the legitimate one.</p>
+ </blockquote>
+ </body>
+ </description>
+ <references>
+ <url>https://www.kde.org/info/security/advisory-20170228-1.txt</url>
+ </references>
+ <dates>
+ <discovery>2017-02-28</discovery>
+ <entry>2017-03-06</entry>
+ </dates>
+ </vuln>
+
<vuln vid="71ebbc50-01c1-11e7-ae1b-002590263bf5">
<topic>codeigniter -- multiple vulnerabilities</topic>
<affects>
Index: x11/kdelibs4/Makefile
===================================================================
--- x11/kdelibs4/Makefile
+++ x11/kdelibs4/Makefile
@@ -3,7 +3,7 @@
PORTNAME= kdelibs
PORTVERSION= ${KDE4_KDELIBS_VERSION}
-PORTREVISION= 9
+PORTREVISION= 10
CATEGORIES= x11 kde
MASTER_SITES= KDE/${KDE4_APPLICATIONS_BRANCH}/applications/${KDE4_APPLICATIONS_VERSION}/src
DIST_SUBDIR= KDE/${PORTVERSION}
Index: x11/kdelibs4/files/patch-git_1804c2f_cve-2017-6410
===================================================================
--- /dev/null
+++ x11/kdelibs4/files/patch-git_1804c2f_cve-2017-6410
@@ -0,0 +1,39 @@
+From 1804c2fde7bf4e432c6cf5bb8cce5701c7010559 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Tue, 28 Feb 2017 19:08:50 +0100
+Subject: [PATCH] Sanitize URLs before passing them to FindProxyForURL
+
+Remove user/password information
+For https: remove path and query
+
+Backport from kio f9d0cb47cf94e209f6171ac0e8d774e68156a6e4
+---
+ kio/misc/kpac/script.cpp | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/kio/misc/kpac/script.cpp b/kio/misc/kpac/script.cpp
+index a595301307..9ab360a0b5 100644
+--- kio/misc/kpac/script.cpp
++++ kio/misc/kpac/script.cpp
+@@ -754,9 +754,16 @@ namespace KPAC
+ }
+ }
+
++ KUrl cleanUrl = url;
++ cleanUrl.setUserInfo(QString());
++ if (cleanUrl.scheme().toLower() == QLatin1String("https")) {
++ cleanUrl.setPath(QString());
++ cleanUrl.setQuery(QString());
++ }
++
+ QScriptValueList args;
+- args << url.url();
+- args << url.host();
++ args << cleanUrl.url();
++ args << cleanUrl.host();
+
+ QScriptValue result = func.call(QScriptValue(), args);
+ if (result.isError()) {
+--
+2.11.1
+

File Metadata

Mime Type
text/plain
Expires
Sat, Aug 15, 8:27 PM (27 m, 46 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36798552
Default Alt Text
D9908.id26031.diff (5 KB)

Event Timeline