diff -Nru kcoreaddons-5.18.0/debian/changelog kcoreaddons-5.18.0/debian/changelog --- kcoreaddons-5.18.0/debian/changelog 2016-03-07 16:19:12.000000000 -0600 +++ kcoreaddons-5.18.0/debian/changelog 2017-08-11 23:36:27.000000000 -0500 @@ -1,3 +1,15 @@ +kcoreaddons (5.18.0-0ubuntu1.1) xenial-security; urgency=high + + * SECURITY UPDATE: KMail - HTML injection in plain text viewer + (LP: #1630700) + - CVE-2016-7966 + - CVE-2016-7966_1.patch - 1be727 from upstream + - CVE-2016-7966_2.patch - 96e562 from upstream + - CVE-2016-7966_3.patch - a06cef from upstream + - CVE-2016-7966_4.patch - 5e13d2 from upstream + + -- Simon Quigley Fri, 11 Aug 2017 23:36:27 -0500 + kcoreaddons (5.18.0-0ubuntu1) xenial; urgency=medium [ Scarlett Clark ] diff -Nru kcoreaddons-5.18.0/debian/control kcoreaddons-5.18.0/debian/control --- kcoreaddons-5.18.0/debian/control 2016-03-07 16:19:12.000000000 -0600 +++ kcoreaddons-5.18.0/debian/control 2017-08-11 23:36:27.000000000 -0500 @@ -1,7 +1,8 @@ Source: kcoreaddons Section: libs Priority: optional -Maintainer: Debian/Kubuntu Qt/KDE Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian/Kubuntu Qt/KDE Maintainers Uploaders: Maximiliano Curia Build-Depends: cmake (>= 2.8.12), debhelper (>= 9), diff -Nru kcoreaddons-5.18.0/debian/patches/CVE-2016-7966_1.patch kcoreaddons-5.18.0/debian/patches/CVE-2016-7966_1.patch --- kcoreaddons-5.18.0/debian/patches/CVE-2016-7966_1.patch 1969-12-31 18:00:00.000000000 -0600 +++ kcoreaddons-5.18.0/debian/patches/CVE-2016-7966_1.patch 2017-08-11 23:14:41.000000000 -0500 @@ -0,0 +1,92 @@ +Description: Fix very old bug when we remove space in url as "foo < >" + This is patch 1/4 fixing CVE-2016-7966, recommended by upstream. +Author: Montel Laurent +Origin: upstream +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1630700 +Applied-Upstream: 1be7272373d60e4234f1a5584e676b579302b053 +Last-Update: 2017-08-11 +--- a/autotests/ktexttohtmltest.cpp ++++ b/autotests/ktexttohtmltest.cpp +@@ -30,6 +30,15 @@ QTEST_MAIN(KTextToHTMLTest) + + Q_DECLARE_METATYPE(KTextToHTML::Options) + ++#ifndef Q_OS_WIN ++void initLocale() ++{ ++ setenv("LC_ALL", "en_US.utf-8", 1); ++} ++Q_CONSTRUCTOR_FUNCTION(initLocale) ++#endif ++ ++ + void KTextToHTMLTest::testGetEmailAddress() + { + // empty input +@@ -372,6 +381,11 @@ void KTextToHTMLTest::testHtmlConvert_da + QTest::newRow("url-in-parenthesis-3") << "bla (http://www.kde.org - section 5.2)" + << KTextToHTML::Options(KTextToHTML::PreserveSpaces) + << "bla (http://www.kde.org - section 5.2)"; ++ ++ // Fix url as foo < > when we concatened them. ++ QTest::newRow("url-with-url") << "foo >" ++ << KTextToHTML::Options(KTextToHTML::PreserveSpaces) ++ << "foo <http://www.kde.org/ <http://www.kde.org/>>"; + } + + +--- a/src/lib/text/ktexttohtml.cpp ++++ b/src/lib/text/ktexttohtml.cpp +@@ -228,11 +228,19 @@ QString KTextToHTMLHelper::getUrl() + + url.reserve(mMaxUrlLen); // avoid allocs + int start = mPos; ++ bool previousCharIsSpace = false; + while ((mPos < (int)mText.length()) && + (mText[mPos].isPrint() || mText[mPos].isSpace()) && + ((afterUrl.isNull() && !mText[mPos].isSpace()) || + (!afterUrl.isNull() && mText[mPos] != afterUrl))) { +- if (!mText[mPos].isSpace()) { // skip whitespace ++ if (mText[mPos].isSpace()) { ++ previousCharIsSpace = true; ++ } else { // skip whitespace ++ if (previousCharIsSpace && mText[mPos] == QLatin1Char('<')) { ++ url.append(QLatin1Char(' ')); ++ break; ++ } ++ previousCharIsSpace = false; + url.append(mText[mPos]); + if (url.length() > mMaxUrlLen) { + break; +@@ -267,7 +275,6 @@ QString KTextToHTMLHelper::getUrl() + } + } while (url.length() > 1); + } +- + return url; + } + +@@ -334,6 +341,7 @@ QString KTextToHTML::convertToHtml(const + QChar ch; + int x; + bool startOfLine = true; ++ //qDebug()<<" plainText"<parseEmoticons(result, true, exclude); + } ++ //qDebug()<<" result "< +Origin: upstream +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1630700 +Applied-Upstream: 96e562d9138c100498da38e4c5b4091a226dde12 +Last-Update: 2017-08-11 +--- a/autotests/ktexttohtmltest.cpp ++++ b/autotests/ktexttohtmltest.cpp +@@ -386,6 +386,12 @@ void KTextToHTMLTest::testHtmlConvert_da + QTest::newRow("url-with-url") << "foo >" + << KTextToHTML::Options(KTextToHTML::PreserveSpaces) + << "foo <http://www.kde.org/ <http://www.kde.org/>>"; ++ ++ // Fix url exploit ++ QTest::newRow("url-exec-html") << "https://\">