krb5_cc_default_name() can return NULL, but is passed directly to strcmp()

Daniel Atallah daniel.atallah at gmail.com
Wed Jun 11 11:56:00 EDT 2008


I've been running into an issue where occasionally when there's a
network change, I'm running into a crash because a NULL pointer is
passed to strcmp().

To provide some background, I'm using the MIT Kerberos for Windows
GSSAPI (version 3.2.2) functionality in the GSSAPI plugin for
Cyrus-SASL.

Immediately before the crash, an error popup is displayed saying:

Internal credentials cache error
(Kerberos error 196)
krb5_cc_next_cred() failed

The crash occurs as soon as I dismiss the popup.

A partially complete stacktrace is below; I'm not sure why it isn't
unwinding the last frames correctly to get to where the strcmp is
actually called, I've seen this sometimes with the utility i'm using
(exchndl.dll from the mingw-tools).
I think it is somehow getting messed up by the leash dll being loaded
dynamically.
-------------------
Error occured on Tuesday, June 10, 2008 at 08:26:04.

Windows Version 5.1 Build 2600 Service Pack 2

C:\devel\pidgin-devel\build\pidgin.exe caused an Access Violation at
location 77c47740 in module C:\WINDOWS\system32\msvcrt.dll Reading
from location 00000000.

Registers:
eax=00000000 ebx=06d3dc28 ecx=0022ea2c edx=00000000 esi=071642bc edi=0022eb2c
eip=77c47740 esp=0022e9d4 ebp=0022eb2c iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00210246

Call stack:
         C:\WINDOWS\system32\msvcrt.dll [7.0.2600.2180]
77C47740 C:\WINDOWS\system32\msvcrt.dll  strcmp
         C:\devel\pidgin-devel\build\gssapi32.dll [1.6.3.16]
1C002BF1 C:\devel\pidgin-devel\build\gssapi32.dll  acquire_init_cred
c:\temp\kfw\src\athena\auth\krb5\src\lib\gssapi\krb5\acquire_cred.c:306
1C001FA5 C:\devel\pidgin-devel\build\gssapi32.dll
krb5_gss_acquire_cred
c:\temp\kfw\src\athena\auth\krb5\src\lib\gssapi\krb5\acquire_cred.c:560
1C001620 C:\devel\pidgin-devel\build\gssapi32.dll  kg_get_defcred
c:\temp\kfw\src\athena\auth\krb5\src\lib\gssapi\krb5\gssapi_krb5.c:148
1C00466C C:\devel\pidgin-devel\build\gssapi32.dll
krb5_gss_init_sec_context
c:\temp\kfw\src\athena\auth\krb5\src\lib\gssapi\krb5\init_sec_context.c:882
1C00A4CF C:\devel\pidgin-devel\build\gssapi32.dll
k5glue_init_sec_context
c:\temp\kfw\src\athena\auth\krb5\src\lib\gssapi\krb5\krb5_gss_glue.c:680
1C00D83C C:\devel\pidgin-devel\build\gssapi32.dll
gss_init_sec_context
c:\temp\kfw\src\athena\auth\krb5\src\lib\gssapi\mechglue\g_init_sec_context.c:225
         C:\devel\pidgin-devel\build\sasl2\saslGSSAPI.dll [2.1.22.0]
01AD295A C:\devel\pidgin-devel\build\sasl2\saslGSSAPI.dll

I was going to report this to the krb5-bugs list, but I couldn't find
the krb5-send-pr program, so I figured I'd try here.

If I should be reporting this in a different way, please let me know.

Thanks,
-D



More information about the krbdev mailing list