Security
Libsecret revealed
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.
Brief items
Security quotes of the week
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: |
|
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: |
|
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: |
|
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: |
|
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: |
|
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: |
|
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: |
|
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: |
|
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: |
|
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: |
|
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: |
|
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: |
|
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: |
|
Page editor: Jake Edge
Next page:
Kernel development>>