|
|
Log in / Subscribe / Register

Security

Centralizing policy rules with PolicyKit

By Jake Edge
November 14, 2007

Linux security policy is very simple at its core: the root user can do anything, while all other users can do very little. Unfortunately, administrators want to be able to allow other users to do a limited subset of the things root is permitted to do. Various solutions have been implemented to try and solve this problem, with a recent one being PolicyKit.

Mounting removable filesystems, CDs, USB devices, and the like, is a classic example of a root-only task that some non-privileged users might be allowed to perform. In the past, various mechanisms using groups or mount options in /etc/fstab have been used with some success, but the mechanisms were specific to mounting and did not provide the flexibility that some administrators would like. Network configuration - particularly for wireless networking - is another common task that users might be allowed to do.

PolicyKit is an attempt to centralize these kinds of decisions into a single policy file that the administrator can use to set the kinds of access regular users should be allowed. Previous solutions required changing each utility to handle policy, each in its own unique format and file(s). PolicyKit is meant to avoid all of that, creating a single place, with a consistent syntax (the now ubiquitous XML), that details the policy rules for that system.

The PolicyKit philosophy decouples the "mechanism" of performing the privileged operation from the user interface used to request it. A GUI network configuration tool might allow a user to choose a different network to associate with, but would have no direct means to make that change. It would, instead, contact a privileged network management daemon through an interprocess communication mechanism (such as D-Bus). That daemon would use the PolicyKit API to determine whether to grant the request.

In order to make that decision, PolicyKit needs three pieces of information, the subject, object, and action. The subject is the user and process requesting the action, while the object is what entity the action is being requested on. In a network configuration example, the subject would be a uid, along with additional identifying information such as SELinux security context, the action would be to change the association, and the object would be the network device.

The mechanism code calls the PolicyKit library, passing the subject, object, and action, receiving back a decision. The decision could be a simple yes or no, or it could, instead, require that the user authenticate - either as themselves or as root - before allowing the operation. Re-authentication can be required on sensitive actions, such as those that malware or malicious users might want to perform, to provide an additional layer of security. All of this policy is governed by the entries in the PolicyKit configuration file. Once the decision has been rendered, it is up to the mechanism to enforce it. This may require coordination with the UI, especially if authentication is required.

Administrators can modify the PolicyKit configuration by way of an XML file, usually PolicyKit.conf. The man page gives a few examples of entries like the following:

    <match action="org.freedesktop.hal.storage.mount-fixed">
      <match user="davidz">
        <return result="yes"/>
      </match>
      <match user="freddy">
        <return result="no"/>
      </match>
    </match>
As should be relatively easy to see, this configuration would allow the user "davidz" to perform the action "mount-fixed" while disallowing the user "freddy". Depending on the default value for that action, as specified in the mechanism's configuration, users not listed could be denied, allowed, or be required to authenticate.

Configuration for mechanisms, which lists the supported actions along with a default policy, is specified in a separate XML file. The mechanism could generate the file on startup and remove it on exit, completely removing the action from the system when it is inactive. Action configuration also includes the message strings that will be displayed by the UI when authenticating or denying users.

PolicyKit has been added to Fedora 8, but is, as yet, mostly unused. There are plans to integrate various GNOME configuration tools with PolicyKit for Fedora 9 and a GNOME API has been created to assist with that. One would guess that a KDE API is in the wings as well.

PolicyKit is not meant to replace SELinux or other security mechanisms, it is simply a means to allow users more privileges in a centralized, easily audited, way. PolicyKit works within the existing access control framework, using whatever privileges have been given to the mechanism. In the end, PolicyKit just provides advice to another program, it is up to that program to enforce the decision, while the OS can and does enforce its own rules upon that process.

Comments (8 posted)

New vulnerabilities

3proxy: denial of service

Package(s):3proxy CVE #(s):CVE-2007-5622
Created:November 9, 2007 Updated:November 14, 2007
Description: Double-free vulnerability in the ftpprchild function in ftppr in 3proxy 0.5 through 0.5.3i allows remote attackers to cause a denial of service (daemon crash) via multiple OPEN commands to the FTP proxy.
Alerts:
Gentoo 200711-13 3proxy 2007-11-08

Comments (none posted)

Django: denial of service

Package(s):Django CVE #(s):CVE-2007-5712
Created:November 12, 2007 Updated:September 22, 2008
Description:

From the CVE notice:

The internationalization (i18n) framework in Django 0.91, 0.95, 0.95.1, and 0.96, and as used in other products such as PyLucid, when the USE_I18N option and the i18n component are enabled, allows remote attackers to cause a denial of service (memory consumption) via many HTTP requests with large Accept-Language headers.

Alerts:
Debian DSA-1640-1 python-django 2008-09-20
Fedora FEDORA-2007-2788 Django 2007-11-09
Fedora FEDORA-2007-3157 Django 2007-11-09

Comments (none posted)

emacs: command execution via local variables

Package(s):emacs CVE #(s):CVE-2007-5795
Created:November 14, 2007 Updated:February 5, 2008
Description: From the original Debian problem report: "In Debian's version of GNU Emacs 22.1+1-2, the `hack-local-variables' function does not behave correctly when `enable-local-variables' is set to :safe. The documentation of `enable-local-variables' states that the value :safe means to set only safe variables, as determined by `safe-local-variable-p' and `risky-local-variable-p' (and the data driving them), but Emacs ignores this and instead sets all the local variables." When this setting (which is not the default) is in effect, opening a hostile file could lead to the execution of arbitrary commands.
Alerts:
Mandriva MDVSA-2008:034 emacs 2007-02-04
Gentoo 200712-03 emacs 2007-12-09
Ubuntu USN-541-1 emacs22 2007-11-13
Fedora FEDORA-2007-2946 emacs 2007-11-17
Fedora FEDORA-2007-3056 emacs 2007-11-17

Comments (1 posted)

gforge: multiple vulnerabilities

Package(s):gforge CVE #(s):CVE-2007-3921
Created:November 8, 2007 Updated:November 14, 2007
Description: The GForge collaborative development tool uses temp files in an insecure manner. Local users can use this to truncate files with the privileges of the gforge user, they can also use this to cause a denial of service.
Alerts:
Debian DSA-1402-1 gforge 2007-11-07

Comments (none posted)

glib2: multiple vulnerabilities

Package(s):glib2 CVE #(s):
Created:November 8, 2007 Updated:November 14, 2007
Description: The glib2 library has multiple (currently unspecified) vulnerabilities in PCRE.
Alerts:
Fedora FEDORA-2007-2944 glib2 2007-11-08

Comments (none posted)

horde3: multiple vulnerabilities

Package(s):horde3 CVE #(s):CVE-2006-3548 CVE-2006-3549 CVE-2006-4256 CVE-2007-1473 CVE-2007-1474
Created:November 12, 2007 Updated:November 14, 2007
Description:

From the Debian advisory:

Several remote vulnerabilities have been discovered in the Horde web application framework. The Common Vulnerabilities and Exposures project identifies the following problems:

CVE-2006-3548: Moritz Naumann discovered that Horde allows remote attackers to inject arbitrary web script or HTML in the context of a logged in user (cross site scripting).

CVE-2006-3549: Moritz Naumann discovered that Horde does not properly restrict its image proxy, allowing remote attackers to use the server as a proxy.

CVE-2006-4256: Marc Ruef discovered that Horde allows remote attackers to include web pages from other sites, which could be useful for phishing attacks.

CVE-2007-1473: Moritz Naumann discovered that Horde allows remote attackers to inject arbitrary web script or HTML in the context of a logged in user (cross site scripting).

CVE-2007-1474: iDefense discovered that the cleanup cron script in Horde allows local users to delete arbitrary files.

Alerts:
Debian DSA-1406-1 horde3 2007-11-09

Comments (none posted)

inotify-tools: arbitrary code execution

Package(s):inotify-tools CVE #(s):CVE-2007-5037
Created:November 12, 2007 Updated:December 28, 2007
Description:

From the Fedora advisory:

A vulnerability has been reported in inotify-tools, which can potentially be exploited by malicious users to compromise an application using the library.

Successful exploitation may allow the execution of arbitrary code with privileges of the application using the affected library.

NOTE: The programs shipped with inotify-tools are reportedly not affected.

The vulnerability is reported in versions prior to 3.11.

Alerts:
Debian DSA-1440-1 inotify-tools 2007-12-28
Fedora FEDORA-2007-3074 inotify-tools 2007-11-09

Comments (none posted)

kernel: remote denial of service

Package(s):kernel CVE #(s):CVE-2006-6058 CVE-2007-4997
Created:November 9, 2007 Updated:June 13, 2008
Description: The Minix filesystem code in Linux kernel 2.6.x up to 2.6.18, and possibly other versions, allows local users to cause a denial of service (hang) via a malformed minix file stream that triggers an infinite loop in the minix_bmap function. NOTE: this issue might be due to an integer overflow or signedness error.

Integer underflow in the ieee80211_rx function in net/ieee80211/ieee80211_rx.c in the Linux kernel 2.6.x before 2.6.23 allows remote attackers to cause a denial of service (crash) via a crafted SKB length value in a runt IEEE 802.11 frame when the IEEE80211_STYPE_QOS_DATA flag is set, aka an "off-by-two error."

Alerts:
Mandriva MDVSA-2008:112 kernel 2007-06-12
Mandriva MDVSA-2008:105 kernel 2007-05-21
Debian DSA-1504 kernel-source-2.6.8 2008-02-22
Ubuntu USN-578-1 linux-source-2.6.15 2008-02-14
SuSE SUSE-SA:2008:006 kernel 2008-02-07
Ubuntu USN-574-1 linux-source-2.6.17/20/22 2008-02-04
Mandriva MDVSA-2008:008 kernel 2008-01-11
Debian DSA-1436-1 linux-2.6 2007-12-20
Debian DSA-1428-2 linux-2.6 2007-12-11
SuSE SUSE-SA:2007:064 kernel 2007-12-04
Red Hat RHSA-2007:1104-01 kernel 2007-12-19
Ubuntu USN-558-1 linux-source-2.6.17/20/22 2007-12-19
Debian DSA-1428-1 linux-2.6 2007-12-10
Red Hat RHSA-2007:0993-01 kernel 2007-11-29
Mandriva MDKSA-2007:232 kernel 2007-11-28
rPath rPSA-2007-0245-2 kernel 2007-11-21
rPath rPSA-2007-0245-1 kernel 2007-11-21
Mandriva MDKSA-2007:226 kernel 2007-11-19
Red Hat RHSA-2007:0672-01 kernel 2007-08-08
SuSE SUSE-SA:2007:059 kernel 2007-11-09

Comments (1 posted)

link-grammar: stack-based buffer overflow

Package(s):link-grammar CVE #(s):CVE-2007-5395
Created:November 13, 2007 Updated:December 17, 2007
Description: Stack-based buffer overflow in the separate_word function in tokenize.c in Link Grammar 4.1b and possibly other versions, as used in AbiWord Link Grammar 4.2.4, allows remote attackers to execute arbitrary code via a long word, as reachable through the separate_sentence function.
Alerts:
Debian DSA-1432-1 link-grammar 2007-12-16
Ubuntu USN-545-1 link-grammar 2007-11-26
Fedora FEDORA-2007-3339 link-grammar 2007-11-15
Gentoo 200711-27 link-grammar 2007-11-18
Fedora FEDORA-2007-3235 link-grammar 2007-11-13

Comments (none posted)

madwifi: denial of service

Package(s):madwifi CVE #(s):CVE-2007-5448
Created:November 8, 2007 Updated:January 11, 2008
Description: The MadWifi driver for Atheros Wireless Lan cards does not process beacon frames correctly. This can be used by a remote attacker to cause a denial of service.
Alerts:
Mandriva MDVSA-2008:007 madwifi-source 2007-01-10
Gentoo 200711-09 madwifi 2007-11-07

Comments (none posted)

openldap: denial of service

Package(s):openldap CVE #(s):CVE-2007-5707
Created:November 8, 2007 Updated:April 9, 2008
Description: The OpenLDAP Lightweight Directory Access Protocol suite has a problem with handling of malformed objectClasses LDAP attributes by the slapd daemon. Both local and remote attackers can use this to crash slapd, causing a denial of service.
Alerts:
Debian DSA-1541-1 openldap2.3 2008-04-08
Gentoo 200803-28 openldap 2008-03-19
Ubuntu USN-551-1 openldap 2007-12-04
Fedora FEDORA-2007-3124 openldap 2007-11-20
SuSE SUSE-SR:2007:024 cacti, openldap2, phpPgAdmin, ruby, perl, rubygem-activesupport, yast2-core, librpcsecgss, liblcms 2007-11-22
Red Hat RHSA-2007:1038-01 openldap 2007-11-15
Fedora FEDORA-2007-741 openldap 2007-11-15
Fedora FEDORA-2007-2796 openldap 2007-11-09
Mandriva MDKSA-2007:215 openldap 2007-11-08
Red Hat RHSA-2007:1037-01 openldap 2007-11-08

Comments (none posted)

php: denial of service

Package(s):php CVE #(s):CVE-2007-4887
Created:November 12, 2007 Updated:November 20, 2007
Description:

From the CVE entry:

The dl function in PHP 5.2.4 and earlier allows context-dependent attackers to cause a denial of service (application crash) via a long string in the library parameter. NOTE: there are limited usage scenarios under which this would be a vulnerability.

Alerts:
rPath rPSA-2007-0242-1 php5 2007-11-19
Slackware SSA:2007-314-02 php 2007-11-12
Slackware SSA:2007-314-01 php 2007-11-12

Comments (none posted)

poppler and xpdf: multiple vulnerabilities

Package(s):poppler xpdf CVE #(s):CVE-2007-4352 CVE-2007-5392 CVE-2007-5393
Created:November 8, 2007 Updated:February 26, 2008
Description: The xpdf and poppler PDF libraries contain several vulnerabilities which can lead to arbitrary command execution via hostile PDF files. Numerous other applications which use these libraries (PDF viewers, CUPS, etc.) will be affected by the vulnerabilities as well.
Alerts:
Debian DSA-1509-1 koffice 2008-02-25
Debian DSA-1480-1 poppler 2008-02-05
Fedora FEDORA-2007-4031 poppler 2007-12-10
Mandriva MDKSA-2007:230 tetex 2007-11-20
Fedora FEDORA-2007-3308 tetex 2007-11-20
Mandriva MDKSA-2007:228 cups 2007-11-19
Mandriva MDKSA-2007:227 poppler 2007-11-19
Gentoo 200711-22 poppler 2007-11-18
Mandriva MDKSA-2007:221 kdegraphics 2007-11-15
Mandriva MDKSA-2007:220 gpdf 2007-11-15
SuSE SUSE-SA:2007:060 xpdf poppler 2007-11-14
Ubuntu USN-542-1 poppler 2007-11-14
rPath rPSA-2007-0252-1 xpdf 2007-11-28
Fedora FEDORA-2007-3390 tetex 2007-11-20
Fedora FEDORA-2007-750 tetex 2007-11-21
Debian DSA-1408-1 kdegraphics 2007-11-21
Mandriva MDKSA-2007:223 pdftohtml 2007-11-17
Mandriva MDKSA-2007:222 koffice 2007-11-17
Mandriva MDKSA-2007:219 xpdf 2007-11-15
Ubuntu USN-542-2 koffice 2007-11-15
Fedora FEDORA-2007-2985 arts 2007-11-13
Fedora FEDORA-2007-2985 kdeaddons 2007-11-13
Fedora FEDORA-2007-2985 kdemultimedia 2007-11-13
Fedora FEDORA-2007-2985 kdeedu 2007-11-13
Fedora FEDORA-2007-2985 kdesdk 2007-11-13
Fedora FEDORA-2007-2985 kdeartwork 2007-11-13
Fedora FEDORA-2007-2985 kdevelop 2007-11-13
Fedora FEDORA-2007-2985 kdetoys 2007-11-13
Fedora FEDORA-2007-2985 kdepim 2007-11-13
Fedora FEDORA-2007-2985 kdelibs 2007-11-13
Fedora FEDORA-2007-2985 kdeaccessibility 2007-11-13
Fedora FEDORA-2007-2985 kdegames 2007-11-13
Fedora FEDORA-2007-2985 kdeadmin 2007-11-13
Fedora FEDORA-2007-2985 kdenetwork 2007-11-13
Fedora FEDORA-2007-2985 kdewebdev 2007-11-13
Fedora FEDORA-2007-2985 kdebindings 2007-11-13
Fedora FEDORA-2007-2985 kdeutils 2007-11-13
Fedora FEDORA-2007-2985 kde-i18n 2007-11-13
Fedora FEDORA-2007-2985 kdebase 2007-11-13
Fedora FEDORA-2007-2985 kdegraphics 2007-11-13
Slackware SSA:2007-316-01 kdegraphics 2007-11-12
Red Hat RHSA-2007:1051-01 kdegraphics 2007-11-12
Red Hat RHSA-2007:1024-01 kdegraphics 2007-11-12
Fedora FEDORA-2007-3093 koffice 2007-11-09
Fedora FEDORA-2007-3014 xpdf 2007-11-09
Fedora FEDORA-2007-3001 kdegraphics 2007-11-09
Fedora FEDORA-2007-3100 cups 2007-11-09
Fedora FEDORA-2007-3059 koffice 2007-11-09
Fedora FEDORA-2007-3031 xpdf 2007-11-09
Red Hat RHSA-2007:1031-01 xpdf 2007-11-07
Red Hat RHSA-2007:1030-01 xpdf 2007-11-07
Red Hat RHSA-2007:1029-01 xpdf 2007-11-07
Red Hat RHSA-2007:1028-01 tetex 2007-11-07
Red Hat RHSA-2007:1026-01 poppler 2007-11-07
Red Hat RHSA-2007:1025-01 gpdf 2007-11-07
Red Hat RHSA-2007:1023-01 cups 2007-11-07
Red Hat RHSA-2007:1022-01 cups 2007-11-07
Red Hat RHSA-2007:1021-01 CUPS 2007-11-07
Fedora FEDORA-2007-746 cups 2007-11-15

Comments (none posted)

tomboy: execution of arbitrary code

Package(s):tomboy CVE #(s):CVE-2005-4790
Created:November 9, 2007 Updated:February 22, 2011
Description: Jan Oravec reported that the "/usr/bin/tomboy" script sets the "LD_LIBRARY_PATH" environment variable incorrectly, which might result in the current working directory (.) to be included when searching for dynamically linked libraries of the Mono Runtime application.

Note that the tomboy vulnerability was added in 2007.

Alerts:
Fedora FEDORA-2008-11551 blam 2008-12-21
Fedora FEDORA-2008-2682 blam 2008-03-26
Mandriva MDVSA-2008:064 tomboy 2007-03-07
Fedora FEDORA-2008-1535 blam 2008-02-13
Gentoo 200801-14 blam 2008-01-27
Ubuntu USN-560-1 tomboy 2008-01-07
Fedora FEDORA-2007-3792 blam 2007-11-26
Fedora FEDORA-2007-3798 blam 2007-11-26
Fedora FEDORA-2007-3253 tomboy 2007-11-13
Fedora FEDORA-2007-3011 tomboy 2007-11-09
Gentoo 200711-12 tomboy 2007-11-08

Comments (none posted)

zope-cmfplone: arbitrary code execution

Package(s):zope-cmfplone CVE #(s):CVE-2007-5741
Created:November 12, 2007 Updated:December 28, 2007
Description:

From the Debian advisory:

It was discovered that Plone, a web content management system, allows remote attackers to execute arbitrary code via specially crafted web browser cookies.

Alerts:
Debian DSA-1405-3 zope-cmfplone 2007-12-01
Debian DSA-1405-2 zope-cmfplone 2007-11-11
Debian DSA-1405-1 zope-cmfplone 2007-11-09

Comments (none posted)

Page editor: Jake Edge
Next page: Kernel development>>


Copyright © 2007, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds