krb5_cc_default crash

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

krb5_cc_default crash

Tim Vega
Hi,

I'm trying to get S4U2proxy to work with mod_auth_kerb. I compiled the patch here,http://sourceforge.net/p/modauthkerb/mailman/message/28531618/, into mod_auth_kerb but it crashes on a call to krb5_cc_default.

The offending line is line 283 of stdcc.c:
err = cc_initialize (&gCntrlBlock, ccapi_version_max, &gCCVersion, NULL);

The top of the stack trace is:
                00000000()
>             krb5_32.dll!stdccv3_setup(_krb5_context * context, _stdccCacheData * ccapi_data)  Line 284 + 0x14 bytes         C
               krb5_32.dll!krb5_stdccv3_resolve(_krb5_context * context, _krb5_ccache * * id, const char * residual)  Line 398 + 0xb bytes            C
               krb5_32.dll!krb5_cc_resolve(_krb5_context * context, const char * name, _krb5_ccache * * cache)  Line 235     C
               krb5_32.dll!krb5_cc_default(_krb5_context * context, _krb5_ccache * * ccache)  Line 57             C
               mod_auth_kerb.so!obtain_server_credentials(request_rec * r, const char * service_name)  Line 1525 + 0x11 bytes                C
               mod_auth_kerb.so!get_gss_creds(request_rec * r, kerb_auth_config * conf, gss_cred_id_struct * * server_creds)  Line 1315             C

Disassembly (the break is at the add instruction):
        err = cc_initialize (&gCntrlBlock, ccapi_version_max, &gCCVersion, NULL);
6647164A  push        0
6647164C  push        offset _gCCVersion (665A5DE4h)
66471651  push        7
66471653  push        offset _gCntrlBlock (665A5DE0h)
66471658  call        dword ptr [_pcc_initialize (665A7048h)]
6647165E  add         esp,10h
66471661  mov         dword ptr [err],eax

_pcc_initialize watched values:
                                _pcc_initialize    0x665a7048 _pcc_initialize           void *
                                *(long *)_pcc_initialize 0              long

Any help would be greatly appreciated!

Tim


_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev
Reply | Threaded
Open this post in threaded view
|

Re: krb5_cc_default crash

Benjamin Kaduk-2
On Thu, 7 Aug 2014, Tim Vega wrote:

> Hi,
>
> I'm trying to get S4U2proxy to work with mod_auth_kerb. I compiled the patch here,http://sourceforge.net/p/modauthkerb/mailman/message/28531618/, into mod_auth_kerb but it crashes on a call to krb5_cc_default.
>
> The offending line is line 283 of stdcc.c:
> err = cc_initialize (&gCntrlBlock, ccapi_version_max, &gCCVersion, NULL);
>
> Disassembly (the break is at the add instruction):
>         err = cc_initialize (&gCntrlBlock, ccapi_version_max, &gCCVersion, NULL);
> 6647164A  push        0
> 6647164C  push        offset _gCCVersion (665A5DE4h)
> 66471651  push        7
> 66471653  push        offset _gCntrlBlock (665A5DE0h)
> 66471658  call        dword ptr [_pcc_initialize (665A7048h)]
> 6647165E  add         esp,10h
> 66471661  mov         dword ptr [err],eax
>
> _pcc_initialize watched values:
>                                 _pcc_initialize    0x665a7048 _pcc_initialize           void *
>                                 *(long *)_pcc_initialize 0              long
>
> Any help would be greatly appreciated!

It somehow seems more likely that the crash would be inside
cc_initialize() than on the stack pointer adjustment after the call.
There is no information about ccapi_context.c available?  Is there
information about a faulting address (e.g., NULL)?

I don't think there's a whole lot to go on, here.
I guess you should say whether you have NODEBUG defined in the krb5 build
environment.

-Ben
_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev
Reply | Threaded
Open this post in threaded view
|

RE: krb5_cc_default crash

Tim Vega
I solved the issue, I neglected to add krb5cc32.dll to the apache bin folder.

-----Original Message-----
From: Benjamin Kaduk [mailto:[hidden email]]
Sent: Friday, August 08, 2014 3:26 PM
To: Tim Vega
Cc: [hidden email]
Subject: Re: krb5_cc_default crash

On Thu, 7 Aug 2014, Tim Vega wrote:

> Hi,
>
> I'm trying to get S4U2proxy to work with mod_auth_kerb. I compiled the patch here,http://sourceforge.net/p/modauthkerb/mailman/message/28531618/, into mod_auth_kerb but it crashes on a call to krb5_cc_default.
>
> The offending line is line 283 of stdcc.c:
> err = cc_initialize (&gCntrlBlock, ccapi_version_max, &gCCVersion,
> NULL);
>
> Disassembly (the break is at the add instruction):
>         err = cc_initialize (&gCntrlBlock, ccapi_version_max, &gCCVersion, NULL);
> 6647164A  push        0
> 6647164C  push        offset _gCCVersion (665A5DE4h)
> 66471651  push        7
> 66471653  push        offset _gCntrlBlock (665A5DE0h)
> 66471658  call        dword ptr [_pcc_initialize (665A7048h)]
> 6647165E  add         esp,10h
> 66471661  mov         dword ptr [err],eax
>
> _pcc_initialize watched values:
>                                 _pcc_initialize    0x665a7048 _pcc_initialize           void *
>                                 *(long *)_pcc_initialize 0              long
>
> Any help would be greatly appreciated!

It somehow seems more likely that the crash would be inside
cc_initialize() than on the stack pointer adjustment after the call.
There is no information about ccapi_context.c available?  Is there information about a faulting address (e.g., NULL)?

I don't think there's a whole lot to go on, here.
I guess you should say whether you have NODEBUG defined in the krb5 build environment.

-Ben


_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev
Reply | Threaded
Open this post in threaded view
|

RE: krb5_cc_default crash

Benjamin Kaduk-2
On Fri, 8 Aug 2014, Tim Vega wrote:

> I solved the issue, I neglected to add krb5cc32.dll to the apache bin folder.

Ah, that would make sense, if pcc_initialize was zero.
Glad you've got things working.

-Ben
_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev