[31605] in Kerberos

home help back first fref pref prev next nref lref last post

SEGV in krb5_free_cred_contents

daemon@ATHENA.MIT.EDU (Markus Moeller)
Wed Oct 21 19:27:02 2009

To: kerberos@mit.edu
From: "Markus Moeller" <huaraz@moeller.plus.com>
Date: Thu, 22 Oct 2009 00:20:31 +0100
Message-ID: <hbo59o$aho$1@ger.gmane.org>
Mime-Version: 1.0
X-Complaints-To: usenet@ger.gmane.org
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

I have an application which creates a cache, stores a ticket and then 
destroys the cache, but sometimes I get a SEGV. This is on OpenSolaris (but 
I think the code is the same as the MIT code).

t@1 (l@1) signal SEGV (no mapping at the fault address) in 
krb5_free_cred_contents at line 180 in file "kfree.c"
  180       if (val->client) {
(dbx) where
current thread: t@1
=>[1] krb5_free_cred_contents(context = ???, val = ???) (optimized), at 
0xd22ddf3b (line ~180) in "kfree.c"
  [2] krb5_free_creds(context = ???, val = ???) (optimized), at 0xd22de11c 
(line ~244) in "kfree.c"
  [3] krb5_mcc_free(context = ???, id = ???) (optimized), at 0xd22b6e74 
(line ~176) in "cc_memory.c"
  [4] krb5_mcc_destroy(context = ???, id = ???) (optimized), at 0xd22b6f4a 
(line ~214) in "cc_memory.c"
  [5] krb5_cc_destroy(context = ???, cache = ???) (optimized), at 0xd22b8671 
(line ~55) in "ccfns.c"
  [6] krb5_cleanup(), line 813 in "test.c"

which is:

  177   void KRB5_CALLCONV
  178   krb5_free_cred_contents(krb5_context context, krb5_creds *val)
  179   {
  180       if (val->client) {
  181           krb5_free_principal(context, val->client);
  182           val->client = 0;
  183       }
  184       if (val->server) {
  185           krb5_free_principal(context, val->server);
  186           val->server = 0;
  187       }
  188

Do I need to check if the cache has credentials before a destroy the cache 
?

Markus 


________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post