[SCM] KDE Base Workspace module packaging branch, master, updated. debian/4.11.13-1-3-gd9526cc
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Nov 7 08:24:57 UTC 2014
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-sc/kde-workspace.git;a=commitdiff;h=1351a75
The following commit has been merged in the master branch:
commit 1351a7567fcdc909c34ed245b9b7bcace65bf540
Author: Maximiliano Curia <maxy at debian.org>
Date: Fri Nov 7 09:12:21 2014 +0100
New patch: upstream_do_not_pass_ntpUtility_as_an_argument.patch fix for https://www.kde.org/info/security/advisory-20141106-1.txt
---
debian/changelog | 3 +-
debian/patches/series | 1 +
...eam_do_not_pass_ntpUtility_as_an_argument.patch | 119 +++++++++++++++++++++
3 files changed, 122 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 8d795b3..b953329 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
kde-workspace (4:4.11.13-2~) UNRELEASED; urgency=medium
- *
+ * New patch: upstream_do_not_pass_ntpUtility_as_an_argument.patch fix
+ for https://www.kde.org/info/security/advisory-20141106-1.txt
-- Maximiliano Curia <maxy at debian.org> Fri, 07 Nov 2014 09:07:20 +0100
diff --git a/debian/patches/series b/debian/patches/series
index 2d9d5e7..2f9db29 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -26,3 +26,4 @@ unlink_testsock
kubuntu_avoid_zic_and_deep_copy_timezone_data.diff
check_if_SensorMgr
ksysguardd_acpi_valgrind_complain
+upstream_do_not_pass_ntpUtility_as_an_argument.patch
diff --git a/debian/patches/upstream_do_not_pass_ntpUtility_as_an_argument.patch b/debian/patches/upstream_do_not_pass_ntpUtility_as_an_argument.patch
new file mode 100644
index 0000000..de7f1c6
--- /dev/null
+++ b/debian/patches/upstream_do_not_pass_ntpUtility_as_an_argument.patch
@@ -0,0 +1,119 @@
+commit eebcb17746d9fa86ea8c5a7344709ef6750781cf
+Author: David Edmundson <kde at davidedmundson.co.uk>
+Date: Tue Nov 4 13:57:59 2014 +0100
+
+ Do not pass ntpUtility as an argument to datetime helper
+
+ Passing the name of a binary to run to a polkit helper is a security
+ risk as it allows any arbitrary process to be executed.
+
+ This patch moves the detection of ntp utility location into the helper
+ function.
+
+ REVIEW: 120977
+
+Index: kde-workspace/kcontrol/dateandtime/dtime.cpp
+===================================================================
+--- kde-workspace.orig/kcontrol/dateandtime/dtime.cpp 2014-11-07 09:09:31.005905464 +0100
++++ kde-workspace/kcontrol/dateandtime/dtime.cpp 2014-11-07 09:09:30.997905785 +0100
+@@ -142,27 +142,15 @@
+ //kclock->setEnabled(enabled);
+ }
+
+-void Dtime::findNTPutility(){
+- QByteArray envpath = qgetenv("PATH");
+- if (!envpath.isEmpty() && envpath[0] == ':') {
+- envpath = envpath.mid(1);
+- }
+-
+- QString path = "/sbin:/usr/sbin:";
+- if (!envpath.isEmpty()) {
+- path += QString::fromLocal8Bit(envpath);
+- } else {
+- path += QLatin1String("/bin:/usr/bin");
+- }
+-
+- foreach(const QString &possible_ntputility, QStringList() << "ntpdate" << "rdate" ) {
+- if( !((ntpUtility = KStandardDirs::findExe(possible_ntputility, path)).isEmpty()) ) {
+- kDebug() << "ntpUtility = " << ntpUtility;
+- return;
++void Dtime::findNTPutility()
++{
++ const QString exePath = QLatin1String("/usr/sbin:/usr/bin:/sbin:/bin");
++ foreach(const QString &possible_ntputility, QStringList() << "ntpdate" << "rdate" ) {
++ ntpUtility = KStandardDirs::findExe(possible_ntputility, exePath);
++ if (!ntpUtility.isEmpty()) {
++ return;
++ }
+ }
+- }
+-
+- kDebug() << "ntpUtility not found!";
+ }
+
+ void Dtime::set_time()
+@@ -238,7 +226,6 @@
+ helperargs["ntp"] = true;
+ helperargs["ntpServers"] = list;
+ helperargs["ntpEnabled"] = setDateTimeAuto->isChecked();
+- helperargs["ntpUtility"] = ntpUtility;
+
+ if(setDateTimeAuto->isChecked() && !ntpUtility.isEmpty()){
+ // NTP Time setting - done in helper
+Index: kde-workspace/kcontrol/dateandtime/helper.cpp
+===================================================================
+--- kde-workspace.orig/kcontrol/dateandtime/helper.cpp 2014-11-07 09:09:31.005905464 +0100
++++ kde-workspace/kcontrol/dateandtime/helper.cpp 2014-11-07 09:09:30.997905785 +0100
+@@ -52,8 +52,18 @@
+ // clears it. So we have to use a reasonable default.
+ static const QString exePath = QLatin1String("/usr/sbin:/usr/bin:/sbin:/bin");
+
+-int ClockHelper::ntp( const QStringList& ntpServers, bool ntpEnabled,
+- const QString& ntpUtility )
++static QString findNtpUtility()
++{
++ foreach(const QString &possible_ntputility, QStringList() << "ntpdate" << "rdate" ) {
++ const QString ntpUtility = KStandardDirs::findExe(possible_ntputility, exePath);
++ if (!ntpUtility.isEmpty()) {
++ return ntpUtility;
++ }
++ }
++ return QString();
++}
++
++int ClockHelper::ntp( const QStringList& ntpServers, bool ntpEnabled )
+ {
+ int ret = 0;
+
+@@ -69,6 +79,8 @@
+ config.writeEntry("servers", ntpServers );
+ config.writeEntry("enabled", ntpEnabled );
+
++ QString ntpUtility(findNtpUtility());
++
+ if ( ntpEnabled && !ntpUtility.isEmpty() ) {
+ // NTP Time setting
+ QString timeServer = ntpServers.first();
+@@ -236,7 +248,7 @@
+ int ret = 0; // error code
+ // The order here is important
+ if( _ntp )
+- ret |= ntp( args.value("ntpServers").toStringList(), args.value("ntpEnabled").toBool(), args.value("ntpUtility").toString() );
++ ret |= ntp( args.value("ntpServers").toStringList(), args.value("ntpEnabled").toBool());
+ if( _date )
+ ret |= date( args.value("newdate").toString(), args.value("olddate").toString() );
+ if( _tz )
+Index: kde-workspace/kcontrol/dateandtime/helper.h
+===================================================================
+--- kde-workspace.orig/kcontrol/dateandtime/helper.h 2014-11-07 09:09:31.005905464 +0100
++++ kde-workspace/kcontrol/dateandtime/helper.h 2014-11-07 09:09:31.001905624 +0100
+@@ -42,8 +42,7 @@
+ ActionReply save(const QVariantMap &map);
+
+ private:
+- int ntp(const QStringList& ntpServers, bool ntpEnabled,
+- const QString& ntpUtility);
++ int ntp(const QStringList& ntpServers, bool ntpEnabled);
+ int date(const QString& newdate, const QString& olddate);
+ int tz(const QString& selectedzone);
+ int tzreset();
--
KDE Base Workspace module packaging
More information about the pkg-kde-commits
mailing list