|
|
Subscribe / Log in / New account

Security

Libsecret revealed

April 4, 2012

This article was contributed by Nathan Willis

GNOME developer Stef Walter has started work on a new client library for interacting with the secret-storage subsystems that allow users to keep track of passwords, encryption keys, and other sensitive data. The new project is named libsecret, and will enable more applications to connect to the GNOME and KDE "secret services," as well as fix longstanding threading and notification problems.

GNOME and KDE each provide their own mechanisms for storing, editing, and retrieving saved secrets; GNOME uses the gnome-keyring-daemon, and KDE uses ksecretservice (evidently there is no formal project page, but a ksecretservice-devel mailing list exists). However, both systems conform to the same standard, the Freedesktop.org Secret Service API. The API defines a "secret item" as a sensitive string needing protection (such as a password or key) along with an array of attributes. It also provides a way to group secret items into collections, each of which can be locked (i.e. encrypted) or unlocked separately.

Typically a desktop environment creates a default collection for each user account, unlocking it at login time, and locking it again when the session ends. Everyday applications like email clients or WiFi network applets can communicate with the service over D-Bus to securely store and retrieve credentials. However, the API also enables specialty applications (such as the Seahorse encryption key manager) to do more, like implement an interface through which users can create and manage their own collections at will.

Building a better client library

Previous GNOME releases exposed gnome-keyring-daemon to applications via the libgnome-keyring library. Libsecret is designed to be a more modern replacement for libgnome-keyring — the secret service daemon itself will remain unchanged. Walter announced the libsecret project on the GNOME desktop-devel list on March 26, noting that the new project would improve on libgnome-keyring by being thread-safe, introspectable, and properly asynchronous. The code is hosted on GNOME's Git repository, while the documentation currently resides in Walter's personal web space.

In an email, Walter elaborated on the shortcomings in libgnome-keyring that warranted writing a replacement from scratch. At its core, he said, libgnome-keyring was built around its own binary protocol. Support for speaking the Secret Service API over D-Bus was added later, but ultimately the underlying code needed to go. Libsecret is designed from the ground up for Secret Service and D-Bus, not only implementing the full API, but doing away with the custom bits. As a result, Walter said, applications will in theory be able to use libsecret to communicate with any Secret Service implementation, including ksecretservice (although so far this has not been tested).

The older API, Walter said, did not include support for change notifications from gnome-keyring-daemon. As a result, applications needed to restart in order to see changes to collections and secret items.

Libgnome-keyring had several other technical limitations, not related to the API. First, it was not thread-safe. Since multiple client applications may need to access password storage (including some that may do so with multiple threads) simultaneously, this was a serious impediment. Second, libgnome-keyring could not use GObject introspection (introduced in GTK+ 3.0), which made developing for it in JavaScript or Python impossible. Walter has added JavaScript and Python examples to the libsecret documentation illustrating the creation of a secret schema and storing, retrieving, and deleting a password.

The API rollout

Walter's documentation breaks the libsecret API into two parts. The first is a simple password API, which he has declared stable. The second is a more general API for "power user" applications, which he plans to continue to develop over the course of the GNOME 3.6 development cycle. The plan is to have the complete API finalized in time for 3.6, and patches deployed to migrate existing core GNOME applications over to libsecret prior to the release.

The simple password API defines methods for storing a secret item in a collection, searching the collection for a secret item, retrieving the secret, and deleting the item from storage. There are both synchronous and asynchronous calls; GUI apps can access the asynchronous methods to avoid blocking while waiting for a response from the Secret Service, while non-GUI applications are expected to use the synchronous methods.

The exact makeup of a secret item is defined by a schema. Every item contains a "secret" plus an optional list of attributes that may vary depending on the type of secret. Secret Services store all attributes as string data (in key-value pairs), but the values may be marked as boolean or integer types so that applications can properly interpret them. By default, retrieving a secret item begins with the application initiating a search against a particular collection (either the default collection, or a specified alternative) for a secret matching some search term. Libsecret assumes that the typical search will include the schema name (e.g., "password" or "key") desired, as the different schemas generally represent disjoint use-cases for secret storage, but this can be turned off with a flag.

The simple password API does not explore using the library for encryption keys or other secret items, but the complete API supports these data types, and libsecret eventually will. The Secret Service API recommends that applications use human-readable text as the storage format for secrets, but this is also not a strict requirement. Applications can even use secret items to store compound data by encoding it in XML or another markup language.

The complete libsecret API also provides methods for an application to create, unlock, access, and lock collections, and to prompt the user for input (such as the password required to unlock a particular collection, or what to name a new collection). There will be support for a session collection that is automatically deleted at logout (which would be useful for storing temporary credentials like login passwords for mounting remote storage).

By itself, libsecret is neutral about the Secret Service used, which can have implications for the application developer. Libsecret, for example, does not guarantee that secret items are stored securely in the service, or that they are transferred to the client application in a secure manner. The Secret Service API allows a service and an application to negotiate an encryption algorithm for transferring secrets, but libsecret does not (yet) support this. However, as the Secret Service documentation points out, there may be other methods an application can use to minimize the risk of exposure, such as using mlock() to prevent memory pages from being written to swap.

Libsecret is still in its infancy, but the prospect of a modern password-and-key-storage mechanism is a refreshing one. Perhaps the most interesting new outcome would be more applications that can seamlessly support gnome-keyring-daemon and ksecretservice, but with the increasing presence of desktop applications written in JavaScript, an API accessible to that language is certainly valuable, too. Shortly after Walter posted the announcement about libsecret, he pushed out updates to the Seahorse, libcryptui, and gnome-keyring packages as well. Those updates were for GNOME 3.4 and thus were not changes for libsecret support, but that effort for those utilities should begin any day.

Comments (6 posted)

Brief items

Security quotes of the week

What "Girls Around Me" does is make clear just how useless Facebook's security settings are. In theory if you know what you're doing you can disclose your personal information to Facebook and prevent FB from sharing it with strangers. But in practice ordinary people are not all Bruce Schneier. Ordinary people with Facebook accounts tend to over-share personal information because our social instincts encourage us to share information with everyone we can see, and to discount abstractions (such as the possibility that software bots thousands of miles away might be harvesting the photographs and information we put online in order to better target advertisements at us—or worse).
-- Charlie Stross

He wants us to trust that a 400-ml bottle of liquid is dangerous, but transferring it to four 100-ml bottles magically makes it safe. He wants us to trust that the butter knives given to first-class passengers are nevertheless too dangerous to be taken through a security checkpoint. He wants us to trust the no-fly list: 21,000 people so dangerous they’re not allowed to fly, yet so innocent they can’t be arrested. He wants us to trust that the deployment of expensive full-body scanners has nothing to do with the fact that the former secretary of homeland security, Michael Chertoff, lobbies for one of the companies that makes them. He wants us to trust that there’s a reason to confiscate a cupcake (Las Vegas), a 3-inch plastic toy gun (London Gatwick), a purse with an embroidered gun on it (Norfolk, VA), a T-shirt with a picture of a gun on it (London Heathrow) and a plastic lightsaber that’s really a flashlight with a long cone on top (Dallas/Fort Worth).
-- Bruce Schneier continues his debate with former TSA administrator Kip Hawley

Comments (7 posted)

New vulnerabilities

aptdaemon: installs altered packages

Package(s):aptdaemon CVE #(s):CVE-2012-0944
Created:April 2, 2012 Updated:April 4, 2012
Description: From the Ubuntu advisory:

It was discovered that Aptdaemon incorrectly handled installing packages without performing a transaction simulation. An attacker could possibly use this flaw to install altered packages.

Alerts:
Ubuntu USN-1414-1 aptdaemon 2012-04-02

Comments (none posted)

chromium: multiple vulnerabilities

Package(s):chromium CVE #(s):CVE-2011-3058 CVE-2011-3059 CVE-2011-3060 CVE-2011-3061 CVE-2011-3062 CVE-2011-3063 CVE-2011-3064 CVE-2011-3065
Created:April 2, 2012 Updated:October 26, 2012
Description: From the CVE entries:

Google Chrome before 18.0.1025.142 does not properly handle the EUC-JP encoding system, which might allow remote attackers to conduct cross-site scripting (XSS) attacks via unspecified vectors. (CVE-2011-3058)

Google Chrome before 18.0.1025.142 does not properly handle SVG text elements, which allows remote attackers to cause a denial of service (out-of-bounds read) via unspecified vectors. (CVE-2011-3059)

Google Chrome before 18.0.1025.142 does not properly handle text fragments, which allows remote attackers to cause a denial of service (out-of-bounds read) via unspecified vectors. (CVE-2011-3060)

Google Chrome before 18.0.1025.142 does not properly check X.509 certificates before use of a SPDY proxy, which might allow man-in-the-middle attackers to spoof servers or obtain sensitive information via a crafted certificate. (CVE-2011-3061)

Off-by-one error in the OpenType Sanitizer in Google Chrome before 18.0.1025.142 allows remote attackers to cause a denial of service or possibly have unspecified other impact via a crafted OpenType file. (CVE-2011-3062)

Google Chrome before 18.0.1025.142 does not properly validate the renderer's navigation requests, which has unspecified impact and remote attack vectors. (CVE-2011-3063)

Use-after-free vulnerability in Google Chrome before 18.0.1025.142 allows remote attackers to cause a denial of service or possibly have unspecified other impact via vectors related to SVG clipping. (CVE-2011-3064)

Skia, as used in Google Chrome before 18.0.1025.142, allows remote attackers to cause a denial of service (memory corruption) or possibly have unspecified other impact via unknown vectors. (CVE-2011-3065)

Alerts:
openSUSE openSUSE-SU-2014:1100-1 Firefox 2014-09-09
Gentoo 201301-01 firefox 2013-01-07
Mageia MGASA-2012-0324 webkit 2012-11-06
Ubuntu USN-1617-1 webkit 2012-10-25
Ubuntu USN-1430-3 thunderbird 2012-05-04
SUSE SUSE-SU-2012:0580-1 Mozilla Firefox 2012-05-02
SUSE SUSE-SU-2012:0688-1 MozillaFirefox 2012-06-02
Ubuntu USN-1430-2 ubufox 2012-04-27
Ubuntu USN-1430-1 firefox 2012-04-27
openSUSE openSUSE-SU-2012:0567-1 firefox, thunderbird, seamonkey, xulrunner 2012-04-27
Mandriva MDVSA-2012:066 mozilla 2012-04-27
Oracle ELSA-2012-0516 thunderbird 2012-04-25
Oracle ELSA-2012-0515 firefox 2012-04-25
Oracle ELSA-2012-0515 firefox 2012-04-25
Scientific Linux SL-fire-20120425 firefox 2012-04-25
Scientific Linux SL-thun-20120425 thunderbird 2012-04-25
CentOS CESA-2012:0516 thunderbird 2012-04-25
CentOS CESA-2012:0516 thunderbird 2012-04-24
CentOS CESA-2012:0515 firefox 2012-04-25
CentOS CESA-2012:0515 firefox 2012-04-25
Red Hat RHSA-2012:0516-01 thunderbird 2012-04-24
Red Hat RHSA-2012:0515-01 firefox 2012-04-24
openSUSE openSUSE-SU-2012:0492-1 chromium 2012-04-12
Gentoo 201203-24 chromium 2012-03-30
Ubuntu USN-1430-4 apparmor 2012-06-12

Comments (none posted)

drupal6-date: unspecified vulnerabilities

Package(s):drupal6-date CVE #(s):
Created:April 2, 2012 Updated:April 4, 2012
Description: Drupal6-date 2.8 evidently fixes some security issues.
Alerts:
Fedora FEDORA-2012-4616 drupal6-date 2012-04-01
Fedora FEDORA-2012-4606 drupal6-date 2012-04-01

Comments (none posted)

flash-player: code execution

Package(s):flash-player CVE #(s):CVE-2012-0773
Created:March 29, 2012 Updated:April 4, 2012
Description:

From the Adobe advisory:

This update resolves a memory corruption vulnerability in the NetStream class that could lead to code execution (CVE-2012-0773).

Alerts:
SUSE SUSE-SU-2012:0437-1 flash-player 2012-03-30
Red Hat RHSA-2012:0434-01 flash-plugin 2012-03-29
openSUSE openSUSE-SU-2012:0427-1 flash-player 2012-03-29

Comments (none posted)

freeradius: authentication bypass

Package(s):freeradius CVE #(s):CVE-2011-2701
Created:April 2, 2012 Updated:April 4, 2012
Description: From the Mandriva advisory:

The ocsp_check function in rlm_eap_tls.c in FreeRADIUS 2.1.11, when OCSP is enabled, does not properly parse replies from OCSP responders, which allows remote attackers to bypass authentication by using the EAP-TLS protocol with a revoked X.509 client certificate.

Alerts:
Gentoo 201311-09 freeradius 2013-11-13
Mandriva MDVSA-2012:047 freeradius 2012-04-02

Comments (none posted)

libpng: code execution

Package(s):libpng CVE #(s):CVE-2011-3048
Created:April 2, 2012 Updated:April 26, 2012
Description: A memory corruption bug, possibly enabling arbitrary code execution, has been found and corrected in libpng.
Alerts:
Slackware SSA:2012-206-01 libpng 2012-07-24
Gentoo 201206-15 libpng 2012-06-22
Oracle ELSA-2012-0523 libpng 2012-04-25
Oracle ELSA-2012-0523 libpng 2012-04-25
Scientific Linux SL-libp-20120425 libpng 2012-04-25
CentOS CESA-2012:0523 libpng 2012-04-25
CentOS CESA-2012:0523 libpng 2012-04-25
Red Hat RHSA-2012:0523-01 libpng 2012-04-25
Fedora FEDORA-2012-5515 libpng 2012-04-24
Fedora FEDORA-2012-5518 libpng 2012-04-24
openSUSE openSUSE-SU-2012:0491-1 libpng 2012-04-12
Fedora FEDORA-2012-5079 libpng10 2012-04-08
Fedora FEDORA-2012-5080 libpng10 2012-04-08
Ubuntu USN-1417-1 libpng 2012-04-05
Debian DSA-2446-1 libpng 2012-04-04
Mandriva MDVSA-2012:046 libpng 2012-04-02

Comments (none posted)

nova: denial of service

Package(s):nova CVE #(s):CVE-2012-1585
Created:March 29, 2012 Updated:April 9, 2012
Description:

From the Ubuntu advisory:

Dan Prince discovered that Nova did not properly perform input validation on the length of server names. An authenticated attacker could issue requests using long server names to exhaust the storage resources containing the Nova API log file.

Alerts:
Fedora FEDORA-2012-5026 openstack-nova 2012-04-08
Ubuntu USN-1413-1 nova 2012-03-29

Comments (none posted)

phpmyadmin: multiple vulnerabilities

Package(s):phpmyadmin CVE #(s):CVE-2012-1190 CVE-2012-1902
Created:April 3, 2012 Updated:May 1, 2012
Description: From the Mandriva advisory:

It was possible to conduct XSS using a crafted database name (CVE-2012-1190).

The show_config_errors.php scripts did not validate the presence of the configuration file, so an error message shows the full path of this file, leading to possible further attacks (CVE-2012-1902).

Alerts:
Fedora FEDORA-2012-5631 phpMyAdmin 2012-05-01
Fedora FEDORA-2012-5624 phpMyAdmin 2012-05-01
openSUSE openSUSE-SU-2012:0494-1 phpMyAdmin 2012-04-12
Mandriva MDVSA-2012:050 phpmyadmin 2012-04-03

Comments (none posted)

php-pear-CAS: multiple vulnerabilities

Package(s):php-pear-CAS CVE #(s):CVE-2012-1104 CVE-2012-1105
Created:April 2, 2012 Updated:April 4, 2012
Description: From the Red Hat bugzilla [1], [2]

1) A security flaw was found in the way phpCAS managed proxying of services. In the detault configuration an phpCAS protected application allowed to proxy any other CAS service with proxy authorization and valid user credentials in the same SSO realm to other phpCAS applications. The application, CAS services has been proxied to, could use this flaw to in unauthorized way to use these CAS services.

2) An information disclosure flaw was found in the way phpCAS, the Central Authentication Service client library in PHP language, performed archiving of debug logging file in the default debug configuration and archiving of proxy configuration session data. Both of the files were archived in /tmp directory in files with unsafe permissions. A local attacker could use this flaw to obtain private user attributes and sensitive login tokens by inspecting content of those archived files.

Alerts:
Fedora FEDORA-2012-4077 php-pear-CAS 2012-03-31
Fedora FEDORA-2012-4119 php-pear-CAS 2012-03-31

Comments (none posted)

pidgin: multiple vulnerabilities

Package(s):pidgin CVE #(s):CVE-2011-4939 CVE-2012-1178
Created:April 2, 2012 Updated:March 15, 2013
Description:

From the Red Hat bugzilla entries [1, 2]:

CVE-2011-4939: A NULL pointer dereference flaw was found in the way XMPP protocol plug-in of Pidgin, a Gtk+ based multiprotocol instant messaging client, performed change of user name for particular buddy. If a remote Pidgin user, present on the buddy list of the victim, changed their Pidgin nickname to specially-crafted value it would lead to Pidgin client crash.

CVE-2012-1178: A denial of service flaw was found in the way MSN protocol plug-in of Pidgin, a Gtk+ based multiprotocol instant messaging client, performed sanitization of certain not UTF-8 encoded text prior its presentation. A remote attacker could send a specially-crafted not UTF-8 encoded text (for example via Offline Instant Message post), which once processed by the Pidgin client of the victim would lead to that Pidgin client abort.

Alerts:
Oracle ELSA-2013-0646 pidgin 2013-03-14
openSUSE openSUSE-SU-2012:0905-1 pidgin 2012-07-24
Scientific Linux SL-pidg-20120719 pidgin 2012-07-19
Oracle ELSA-2012-1102 pidgin 2012-07-20
CentOS CESA-2012:1102 pidgin 2012-07-19
CentOS CESA-2012:1102 pidgin 2012-07-19
Red Hat RHSA-2012:1102-01 pidgin 2012-07-19
Ubuntu USN-1500-1 pidgin 2012-07-09
SUSE SUSE-SU-2012:0782-1 finch, libpurple and pidgin 2012-06-22
Fedora FEDORA-2012-4600 pidgin 2012-04-01

Comments (none posted)

rpm: code execution

Package(s):rpm CVE #(s):CVE-2012-0060 CVE-2012-0061 CVE-2012-0815
Created:April 4, 2012 Updated:May 7, 2012
Description: The rpm utility has several parsing flaws that can be exploited via a malicious package file to crash the tool or execute arbitrary code. Importantly, the exploit can happen before the validation of the package file's digital signature, so the checks that would normally stop a hostile package file are ineffective here.
Alerts:
Debian-LTS DLA-140-1 rpm 2015-01-28
Ubuntu USN-1695-1 rpm 2013-01-17
Gentoo 201206-26 rpm 2012-06-24
openSUSE openSUSE-SU-2012:0589-1 rpm, rpm-python 2012-05-07
openSUSE openSUSE-SU-2012:0588-1 rpm, rpm-python 2012-05-07
Fedora FEDORA-2012-5420 rpm 2012-04-22
Fedora FEDORA-2012-5421 rpm 2012-04-22
Oracle ELSA-2012-0451 rpm 2012-04-17
Mandriva MDVSA-2012:056 rpm 2012-04-12
Scientific Linux SL-rpm-20120404 rpm 2012-04-04
Oracle ELSA-2012-0451 rpm 2012-04-03
Oracle ELSA-2012-0451 rpm 2012-04-03
CentOS CESA-2012:0451 rpm 2012-04-03
CentOS CESA-2012:0451 rpm 2012-04-03
Red Hat RHSA-2012:0451-01 rpm 2012-04-03

Comments (18 posted)

tryton-server: privilege escalation

Package(s):tryton-server CVE #(s):CVE-2012-0215
Created:March 29, 2012 Updated:April 9, 2012
Description:

From the Debian advisory:

It was discovered that the Tryton application framework for Python allows authenticated users to escalate their privileges by editing the Many2Many field.

Alerts:
Fedora FEDORA-2012-4988 trytond 2012-04-08
Fedora FEDORA-2012-4963 trytond 2012-04-08
Debian DSA-2444-1 tryton-server 2012-03-29

Comments (none posted)

typo3-src: multiple vulnerabilities

Package(s):typo3-src CVE #(s):CVE-2012-1606 CVE-2012-1607 CVE-2012-1608
Created:April 2, 2012 Updated:April 4, 2012
Description: From the Debian advisory:

CVE-2012-1606: Failing to properly HTML-encode user input in several places, the TYPO3 backend is susceptible to Cross-Site Scripting. A valid backend user is required to exploit these vulnerabilities.

CVE-2012-1607: Accessing a CLI Script directly with a browser may disclose the database name used for the TYPO3 installation.

CVE-2012-1608: By not removing non printable characters, the API method t3lib_div::RemoveXSS() fails to filter specially crafted HTML injections, thus is susceptible to Cross-Site Scripting.

Alerts:
Debian DSA-2445-1 typo3-src 2012-03-31

Comments (none posted)

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


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