Memory leaks in krb5?

Derrick Schommer schommer at gmail.com
Mon Sep 20 15:59:23 EDT 2004


I was running valgrind to check some of my kerberos authentication and 
ran into this:

==11600== 28 bytes in 1 blocks are definitely lost in loss record 9 of 12
==11600==    at 0x1B90340D: calloc (vg_replace_malloc.c:176)
==11600==    by 0x125624: decode_krb5_enc_cred_part (in 
/usr/lib/libkrb5.so.3.2)
==11600==    by 0x149E5E: (within /usr/lib/libkrb5.so.3.2)
==11600==    by 0x149F61: (within /usr/lib/libkrb5.so.3.2)
==11600==    by 0x14A23B: krb5_rd_cred (in /usr/lib/libkrb5.so.3.2)


Its only 28 blocks, but if I repeat the authentication over and over it 
grows quickly.  It seems that when I get a forwarded tgt (krb5_fwd_tgt() 
) and call krb5_rd_cred() it allocates some memory in the asn.1 decoder 
and I'm not sure why its not cleaned up (or where it should be cleaned up).

All I know is that if I call krb5_rd_cred() 10 times I'll have 28 * 10 
bytes of leaked memory.

Not sure what to do at this point.  I'm running krb5 1.3.4.

Any ideas?

Thanks,

Derrick


More information about the Kerberos mailing list