GNOME_KEYRING_RESULT_IO_ERROR from launchpadlib

Bug #1221955 reported by Philip Muškovac
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
GNOME Keyring
Invalid
Medium
gnome-keyring (Debian)
Confirmed
Unknown
gnome-keyring (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have no reliable way to reproduce it, but every now and then when using pull-ppa-source (from lp:kubuntu-dev-tools) the script fails with this error: (tokens stripped from output)

Gkr-Message: received an invalid, unencryptable, or non-utf8 secret
Gkr-Message: call to daemon returned an invalid response: (null).(null)()
Gkr-Message: received an invalid, unencryptable, or non-utf8 secret
Gkr-Message: call to daemon returned an invalid response: (null).(null)()
The authorization page:
 (https://launchpad.net/+authorize-token?oauth_token=<>&allow_permission=DESKTOP_INTEGRATION)
should be opening in your browser. Use your browser to authorize
this program to access Launchpad on your behalf.
Press any key to continue or wait (5) seconds...
Waiting to hear from Launchpad about your decision...
00:24:38 unnamed app(24933) ClientApp::doIt: Creating ClientApp
00:24:38 kioclient(24933) ClientApp::kde_open: KUrl("https://launchpad.net/+authorize-token?oauth_token=<>&allow_permission=DESKTOP_INTEGRATION")
00:24:38 kioclient(24933)/kio (KRun) KRun::slotTimeout: KRun(0x269dbe0) slotTimeout called
00:24:38 kioclient(24933)/kio (KRun) KRun::init: INIT called
00:24:38 kioclient(24933)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-yofel/ksycoca4"
00:24:38 kioclient(24933)/kfile (kdelibs) KRecentDocument::add: KRecentDocument::add for "https://launchpad.net/+authorize-token?oauth_token=<>&allow_permission=DESKTOP_INT
EGRATION"
00:24:38 kioclient(24933)/kio (KRun) runTempService: runTempService: first url "https://launchpad.net/+authorize-token?oauth_token=<>&allow_permission=DESKTOP_INTEGRATION"
00:24:38 kioclient(24933)/kio (KRun) supportedProtocols: supportedProtocols: ("KIO")
00:24:38 kioclient(24933)/kio (KRun) runTempService: runTempService: KProcess args= ("/usr/bin/firefox", "https://launchpad.net/+authorize-token?oauth_token=<>&allow_permiss
ion=DESKTOP_INTEGRATION")
00:24:38 kioclient(24933)/kdecore (KStartupInfo) KStartupInfo::createNewStartupId: creating: "yofel-T510;1378506278;233618;24933_TIME0" : ""
00:24:38 kioclient(24933)/kdecore (KStartupInfo) KStartupInfo::sendStartup: sending "new: ID="yofel-T510;1378506278;233618;24933_TIME0" BIN="firefox" DESCRIPTION="Launching " DESKTOP=1 WM
CLASS="0" HOSTNAME=yofel-T510 NAME="firefox" SCREEN=0"
00:24:38 kioclient(24933)/kdecore (KStartupInfo) KStartupInfo::sendChange: sending "change: ID="yofel-T510;1378506278;233618;24933_TIME0" PID=24935"
00:24:38 kioclient(24933)/kio (KRun) KRun::slotTimeout: KRun(0x269dbe0) slotTimeout called

(process:24935): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
00:24:38 kioclient(24933)/kio (KRun) KProcessRunner::slotProcessExited: "firefox" exitCode= 0 exitStatus= 0
00:24:38 kioclient(24933)/kdecore (KStartupInfo) KStartupInfo::sendFinish: sending "remove: ID="yofel-T510;1378506278;233618;24933_TIME0" HOSTNAME=yofel-T510 PID=24935"
Gkr-Message: secret service operation failed: The secret was transferred or encrypted in an invalid way.
Traceback (most recent call last):
  File "/usr/bin/pull-ppa-source", line 49, in <module>
    lp = Launchpad.login_with("pull-ppa-source", "production")
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 539, in login_with
    credential_save_failed, version)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 346, in _authorize_token_and_login
    credentials = authorization_engine(credentials, credential_store)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py", line 520, in __call__
    credential_store.save(credentials, self.unique_consumer_id)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py", line 276, in save
    raise e
keyring.errors.PasswordSetError: GNOME_KEYRING_RESULT_IO_ERROR

Happens usually when using the kubuntu ppa packages batch backport script which calls pull-ppa-source about 160 times (once for every KDE SC source).

ProblemType: BugDistroRelease: Ubuntu 13.10
Package: gnome-keyring 3.8.2-0ubuntu3
ProcVersionSignature: Ubuntu 3.11.0-4.9-generic 3.11.0-rc7
Uname: Linux 3.11.0-4-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.12.1-0ubuntu3
Architecture: amd64
Date: Sat Sep 7 00:27:19 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2011-10-08 (699 days ago)
InstallationMedia: Kubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20111007)
MarkForUpload: TrueSourcePackage: gnome-keyring
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Philip Muškovac (yofel) wrote :
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-keyring (Ubuntu):
status: New → Confirmed
Revision history for this message
Jaromil (jaromil) wrote :

I'm stumbling into this bug now and then, using standard C code to query gnome-keyring via gnome_keyring_find_password_sync()

Works most of the time, but returns the error with an approximated ratio of 2% of the times it is called. In some implementation this may lead in a dialog asking a password that is already saved, resulting in an overwrite of passwords stored inside the gnome keyring.

The error message is:

```
Gkr-Message: received an invalid, unencryptable, or non-utf8 secret
Gkr-Message: call to daemon returned an invalid response: (null).(null)()
```

A good way to reproduce could be to write a code that loops through subsequent gnome_keyring_find_password_sync() requests.

Revision history for this message
Jaromil (jaromil) wrote :

Hi again.

This bug affects every software using gnome-keyring and as such represents a serious security issue which should be examined with attention, to avoid future surprises.

The gnome-keyring is the gateway keeper to all passwords saved on gnome desktops, used via dbus which may also be a cause to the problem.

I hope the importance of this bug is somehow elevated from the current "undecided".

Revision history for this message
Robert Tari (robert-tari) wrote :

Confirmed. Also manifests itself in 15.10 while mounting encrypted USB storage. (Keys that have already been stored before, are being asked for again and fail to be overwritten)

Revision history for this message
sverker wahlin (sverker-wahlin) wrote :

manifests for me as well in 15.10.

Changed in gnome-keyring:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in gnome-keyring (Debian):
status: Unknown → New
Changed in gnome-keyring:
status: Confirmed → Invalid
Changed in gnome-keyring (Debian):
status: New → Confirmed
Revision history for this message
Jon Gjengset (jonhoo) wrote :

I believe this has been fixed in libsecret in https://bugzilla.gnome.org/show_bug.cgi?id=778357.

Revision history for this message
Jaromil (jaromil) wrote :

Is there any versioning information of this libsecret?
Not having a test suite is hard to tell.
I'm running 0.18.5-3.1 from devuan ascii and will try to replicate.

Revision history for this message
Jaromil (jaromil) wrote :

I confirm this error still occurs using libsecret from the Debian package version 0.18.5-3.1

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.