After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 504314 - Crash when storing a web calendar password from evolution
Crash when storing a web calendar password from evolution
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: general
2.20.x
Other All
: Normal critical
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2007-12-18 19:46 UTC by Sam Morris
Modified: 2008-01-12 17:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
patch to prevent crash (706 bytes, patch)
2007-12-18 19:50 UTC, Sam Morris
needs-work Details | Review

Description Sam Morris 2007-12-18 19:46:58 UTC
Steps to reproduce:
1. In Evolution, create a new calendar 'on the web' from a source that requires HTTP authentication.
2. When prompted, enter your password.
3. gnome-keyring-daemon crashes.

Stack trace:
        #0  0xb7c4e9d8 in strcmp () from /lib/i686/cmov/libc.so.6
        No symbol table info available.
        #1  0x0805a663 in gkr_keyring_item_match (item=0x807af20, 
            type=GNOME_KEYRING_ITEM_NETWORK_PASSWORD, attributes=0x806f1b0, 
            match_all=1) at gkr-keyring-item.c:233
        	i = 0
        	j = 0
        	item_attribute = (GnomeKeyringAttribute *) 0x807ed08
        	attribute = (GnomeKeyringAttribute *) 0x8082a50
        	found = 1
        	attributes_matching = 1
        	__PRETTY_FUNCTION__ = "gkr_keyring_item_match"
        #2  0x0805847c in gkr_keyring_find_item (keyring=0x80770a0, 
            type=GNOME_KEYRING_ITEM_NETWORK_PASSWORD, attrs=0x806f1b0)
            at gkr-keyring.c:1027
        	item = (GkrKeyringItem *) 0x807af20
        	l = (GList *) 0x807b700
        #3  0x0805155b in op_create_item (packet=0x807ce3c, result=0x807ce50, 
            req=0xb5a1c368) at gkr-daemon-ops.c:1304
        	keyring_name = 0x0
        	display_name = 0x807d950 "webcal://albion.red-redemption.com/cal/robin"
        	secret = 0xb7ee4038 "calendar"
        	attributes = (GnomeKeyringAttributeList *) 0x806f1b0
        	hashed = (GnomeKeyringAttributeList *) 0x0
        	item = (GkrKeyringItem *) 0x0
        	keyring = (GkrKeyring *) 0x80770a0
        	type = 1
        	res = GNOME_KEYRING_RESULT_OK
        	id = 0
        	update_if_exists = 1
        #4  0x0804ebdc in client_worker_main (user_data=0x807ce30)
            at gkr-daemon-io.c:426
        	client = (GnomeKeyringClient *) 0x807ce30
        	op = GNOME_KEYRING_OP_CREATE_ITEM
        	req = {app_ref = 0x807adf0}
        	pid = 10608
        	uid = 1000
        	str = 0x807f208 "evolution"
        	__PRETTY_FUNCTION__ = "client_worker_main"
        #5  0x0805d720 in async_worker_thread (data=0x807db58) at gkr-async.c:193
        	worker = (GkrAsyncWorker *) 0x807db58
        	result = (gpointer) 0xb7dc9de8
        	__PRETTY_FUNCTION__ = "async_worker_thread"
        #6  0xb7d7c4ff in g_thread_create_proxy (data=0x807cee0)
            at /tmp/buildd/glib2.0-2.14.3/glib/gthread.c:635
        	__PRETTY_FUNCTION__ = "g_thread_create_proxy"
        #7  0xb7bca4fb in start_thread () from /lib/i686/cmov/libpthread.so.0
        No symbol table info available.
        #8  0xb7cb360e in clone () from /lib/i686/cmov/libc.so.6
        No symbol table info available.

Looks like it's segfaulting while trying to compare two strings:

        (gdb) print attribute->value.string
        $3 = 0x0
        (gdb) print item_attribute->value.string
        $4 = 0x0

Other information:
Forwarded from <http://bugs.debian.org/456967>
Comment 1 Sam Morris 2007-12-18 19:50:07 UTC
Created attachment 101212 [details] [review]
patch to prevent crash

This stops the daemon from crashing.
Comment 2 Stef Walter 2007-12-19 04:29:11 UTC
Thanks for catching that. 

Fixed it slightly differently so that null strings will still match one another as expected. 
Comment 3 Stef Walter 2007-12-19 04:29:54 UTC
Fix will be included in the 2.20.3 and later releases.
Comment 4 Sam Morris 2007-12-19 10:41:31 UTC
Great! Could you please let me know the revision number once you check it in so that I can apply the patch to Debian's gnome-keyring package?
Comment 5 Sam Morris 2008-01-03 19:21:48 UTC
Stef, I applied the patch to a copy of gnome-keyring 2.20.2 and it has a strange effect. The daemon no longer crashes, and passwords are stored in my keyring; however, I'm asked for them every time by evolution. I guess that the keyring daemon isn't finding the passwords that Evolution stores (maybe because Evolution is performing the searches incorrectly?)

Anyway I'd appreciate if you could take a look at the patch I applied (at <http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-keyring/debian/patches/fix_evolution_crash.patch?op=file&rev=0&sc=0>) and let me know whether I should file a separate bug about it?
Comment 6 Stef Walter 2008-01-12 17:27:10 UTC
The patch itself is actually incorrect. The fix that was actually applied is here: 

http://svn.gnome.org/viewvc/gnome-keyring?view=revision&revision=972

I guess you also saw that gnome-keyring 2.20.3 has now been released.