[wicd/f15] Fix CVE-2012-2095 (#811763)
David Cantrell
dcantrel at fedoraproject.org
Fri Apr 13 14:37:00 UTC 2012
commit 7156261d57ef60f04b8f7f60660572dc62310346
Author: David Cantrell <dcantrell at redhat.com>
Date: Fri Apr 13 10:36:53 2012 -0400
Fix CVE-2012-2095 (#811763)
wicd-1.7.0-CVE-2012-2095.patch | 91 ++++++++++++++++++++++++++++++++++++++++
wicd.spec | 13 +++++-
2 files changed, 102 insertions(+), 2 deletions(-)
---
diff --git a/wicd-1.7.0-CVE-2012-2095.patch b/wicd-1.7.0-CVE-2012-2095.patch
new file mode 100644
index 0000000..da6a4b3
--- /dev/null
+++ b/wicd-1.7.0-CVE-2012-2095.patch
@@ -0,0 +1,91 @@
+diff -up wicd-1.7.0/wicd/wicd-daemon.py.CVE-2012-2095 wicd-1.7.0/wicd/wicd-daemon.py
+--- wicd-1.7.0/wicd/wicd-daemon.py.CVE-2012-2095 2012-04-13 10:17:46.356047035 -0400
++++ wicd-1.7.0/wicd/wicd-daemon.py 2012-04-13 10:18:35.018046979 -0400
+@@ -978,6 +978,28 @@ class WirelessDaemon(dbus.service.Object
+ "wireless-settings.conf"),
+ debug=debug)
+
++ self._validProperties = (
++ 'bssid',
++ 'essid',
++ 'hidden',
++ 'channel',
++ 'mode',
++ 'enctype',
++ 'encryption_method',
++ 'key',
++ 'automatic',
++ 'ip',
++ 'netmask',
++ 'broadcast',
++ 'gateway',
++ 'use_static_dns',
++ 'use_global_dns',
++ 'dns1',
++ 'dns2',
++ 'dns3',
++ 'use_settings_globally',
++ )
++
+ def get_debug_mode(self):
+ return self._debug_mode
+ def set_debug_mode(self, mode):
+@@ -1086,9 +1108,9 @@ class WirelessDaemon(dbus.service.Object
+ def SetWirelessProperty(self, netid, prop, value):
+ """ Sets property to value in network specified. """
+ # We don't write script settings here.
+- if (prop.strip()).endswith("script"):
+- print "Setting script properties through the daemon is not" \
+- + " permitted."
++ if prop.strip() not in self._validProperties:
++ print "Trying to set invalid property (or property not " \
++ "permitted): "+ prop.strip() + "."
+ return False
+ self.LastScan[netid][prop] = misc.to_unicode(misc.Noneify(value))
+
+@@ -1365,6 +1387,25 @@ class WiredDaemon(dbus.service.Object):
+ "wired-settings.conf"),
+ debug=debug)
+
++ self._validProperties = (
++ 'ip',
++ 'broadcast',
++ 'netmask',
++ 'gateway',
++ 'search_domain',
++ 'dns_domain',
++ 'dns1',
++ 'dns2',
++ 'dns3',
++ 'encryption_enabled',
++ 'default',
++ 'dhcphostname',
++ 'lastused',
++ 'profilename',
++ 'use_global_dns',
++ 'use_static_dns',
++ )
++
+ def get_debug_mode(self):
+ return self._debug_mode
+ def set_debug_mode(self, mode):
+@@ -1405,14 +1446,14 @@ class WiredDaemon(dbus.service.Object):
+ return str(iface)
+
+ @dbus.service.method('org.wicd.daemon.wired')
+- def SetWiredProperty(self, property, value):
++ def SetWiredProperty(self, prop, value):
+ """ Sets the given property to the given value. """
+ if self.WiredNetwork:
+- if (property.strip()).endswith("script"):
+- print "Setting script properties through the daemon" \
+- + " is not permitted."
++ if prop.strip() not in self._validProperties:
++ print "Trying to set invalid property (or property not " \
++ "permitted): "+ prop.strip() + "."
+ return False
+- self.WiredNetwork[property] = misc.to_unicode(misc.Noneify(value))
++ self.WiredNetwork[prop] = misc.to_unicode(misc.Noneify(value))
+ return True
+ else:
+ print 'SetWiredProperty: WiredNetwork does not exist'
diff --git a/wicd.spec b/wicd.spec
index bcfcd58..31f1df3 100644
--- a/wicd.spec
+++ b/wicd.spec
@@ -9,7 +9,7 @@
Name: wicd
Version: 1.7.0
-Release: 11%{?dist}
+Release: 12%{?dist}
Summary: Wireless and wired network connection manager
Group: System Environment/Base
@@ -28,6 +28,7 @@ Patch4: wicd-1.7.0-dbus-policy.patch
Patch5: wicd-1.7.0-wired_showing.patch
Patch6: wicd-1.7.0-initialize-check-and-message.patch
Patch7: wicd-1.7.0-CVE-2012-0813.patch
+Patch8: wicd-1.7.0-CVE-2012-2095.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
BuildRequires: python2-devel
@@ -118,6 +119,11 @@ Client program for wicd that uses a GTK+ interface.
# http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/revision/682
%patch7 -p1
+# Fix CVE-2012-2095
+# Patch based on upstream:
+# http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/revision/751
+%patch8 -p1
+
%build
# NOTE: --etc is where dhclient.conf.template goes
%{__python} setup.py configure \
@@ -302,8 +308,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/icons/hicolor/scalable/apps/wicd-gtk.svg
%changelog
+* Fri Apr 13 2012 David Cantrell <dcantrell at redhat.com> - 1.7.0-12
+- Fix CVE-2012-2095 (#811763)
+
* Fri Jan 27 2012 David Cantrell <dcantrell at redhat.com> - 1.7.0-11
-- Fix CVS-2012-0813 (#785147)
+- Fix CVE-2012-0813 (#785147)
* Fri Aug 19 2011 David Cantrell <dcantrell at redhat.com> - 1.7.0-10
- Initialize appGui._wired_showing in __init__ (#723553)
More information about the scm-commits
mailing list