GNOME Bugzilla – Bug 586192
gnome-keyring-daemon crashes when trying to decrypt SSH key
Last modified: 2009-07-21 13:45:16 UTC
Steps to reproduce: 1. In a terminal, `eval gnome-keyring-daemon --start`. 2. ssh somehost 3. Kaboom. Stack trace: Program received signal SIGABRT, Aborted.
+ Trace 216059
Thread 140593057438032 (LWP 1029)
Other information: This is on an amd64 host w/ a DSA key. The problem is that gcry_free() is the wrong free routine to call from load_secure_key(). "decrypted" was allocated from gnome-keyring's own secure memory pool, and so it should call egg_memory_free instead. --- gnome-keyring-2.26.1/pkcs11/ssh-store/gck-ssh-openssh.c.orig 2009-03-02 07:43:12.000000000 -0800 +++ gnome-keyring-2.26.1/pkcs11/ssh-store/gck-ssh-openssh.c 2009-06-17 20:41:05.000000000 -0700 @@ -176,7 +176,7 @@ /* Try to parse */ ret = gck_data_der_read_private_key (decrypted, n_decrypted, skey); - gcry_free (decrypted); + egg_secure_free (decrypted); if (ret != GCK_DATA_UNRECOGNIZED) return ret;
Created attachment 136888 [details] [review] Call egg_secure_free instead of gcry_Free.
Awesome, thanks for the patch. The patch is correct, but I'm not super clear on why the crash happened. It must have occurred in a strange scenario where secure memory wasn't available. Committed to gnome-keyring. Will be included in the 2.26.3 and later releases.
*** Bug 588443 has been marked as a duplicate of this bug. ***