Skip Menu |
 

Subject: gss_import_name can fail to call gssint_initialize_library()
Cc: paul@vix.com
Paul Vixie reports that one of imapd's calls to gss_release_name()
following a successful gss_import_name() crashes due to an assertion
failure, which after my brief analysis results from a code path in
gss_import_name() failing to call through the gssint_get_mechanism()
choke point which calls gssint_initialize_library().
From: tlyu@mit.edu
Subject: SVN Commit
* src/lib/gssapi/mechglue/g_initialize.c (gss_release_oid): Call
gssint_initialize_library to ensure mutex is initialized.

Commit By: tlyu



Revision: 18397
Changed Files:
U trunk/src/lib/gssapi/mechglue/g_initialize.c
Date: Wed, 2 Aug 2006 22:55:48 +0200
From: Robert Scheck <krb5@robert-scheck.de>
To: krb5-bugs@mit.edu
Subject: Assertion `(&(&_m->os)->n)->initialized == K5_MUTEX_DEBUG_INITIALIZED' failed
Hello folks,

about I week ago, I wrote this mail to the main list - but I still was
ignored or nobody else was interested for looking in. Nevertheless, I
think, I discovered a bug or a regression, but I'm not sure whether it is
related to krb5 or to uw-imap. The problem came up when upgrading from krb5
1.4.x to 1.5: ipop3d from uw-imap refuses any POP3 connection with the
error message: g_initialize.c:97: gss_release_oid: Assertion `(&(&_m->os)
->n)->initialized == K5_MUTEX_DEBUG_INITIALIZED' failed.

Spoken with other words, uw-imap using krb5 1.5:

Show quoted text
> telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
ipop3d: g_initialize.c:97: gss_release_oid: Assertion
`(&(&_m->os)->n)->initialized == K5_MUTEX_DEBUG_INITIALIZED' failed.
Connection closed by foreign host.
Show quoted text
>

And here is uw-imap using krb5 1.4.x:

Show quoted text
> telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK POP3 localhost 2004.89 server ready
quit
+OK Sayonara
Connection closed by foreign host.
Show quoted text
>

Any hints or suggestions?


Greetings,
Robert
To: rt@krbdev.mit.edu
Subject: Re: [krbdev.mit.edu #4096] Assertion `(&(&_m->os)->n)->initialized == K5_MUTEX_DEBUG_INITIALIZED' failed
From: Tom Yu <tlyu@MIT.EDU>
Date: Mon, 07 Aug 2006 13:12:08 -0400
RT-Send-Cc:
Thanks for the report. This is probably the same bug as ticket #4088.
I'll merge the tickets shortly. Please let us know if the following
patch fixes the problem for you.

Index: src/lib/gssapi/mechglue/g_initialize.c
===================================================================
--- src/lib/gssapi/mechglue/g_initialize.c (revision 18396)
+++ src/lib/gssapi/mechglue/g_initialize.c (revision 18397)
@@ -89,6 +89,9 @@
OM_uint32 major;
gss_mech_info aMech;

+ if (gssint_initialize_library())
+ return GSS_S_FAILURE;
+
if (minor_status == NULL)
return (GSS_S_CALL_INACCESSIBLE_WRITE);

Date: Mon, 7 Aug 2006 19:43:51 +0200
From: Robert Scheck <krb5@robert-scheck.de>
To: Tom Yu via RT <rt-comment@krbdev.mit.edu>
Subject: Re: [krbdev.mit.edu #4096] Assertion `(&(&_m->os)->n)->initialized == K5_MUTEX_DEBUG_INITIALIZED' failed
RT-Send-Cc:
Hello Tom,

On Mon, 07 Aug 2006, Tom Yu via RT wrote:
Show quoted text
> Thanks for the report. This is probably the same bug as ticket #4088.
> I'll merge the tickets shortly. Please let us know if the following
> patch fixes the problem for you.

thank you for providing the patch - it resolves my problem completely.

Greetings,
Robert
From: tlyu@mit.edu
Subject: SVN Commit
pull up r18397 from trunk

r18397@cathode-dark-space: tlyu | 2006-08-01 17:09:43 -0400
ticket: 4088
status: open

* src/lib/gssapi/mechglue/g_initialize.c (gss_release_oid): Call
gssint_initialize_library to ensure mutex is initialized.



Commit By: tlyu



Revision: 18409
Changed Files:
_U branches/krb5-1-5/
U branches/krb5-1-5/src/lib/gssapi/mechglue/g_initialize.c