About Memory Leak of kinit with pkinit Plugin

Zhou Yang sherice.911 at gmail.com
Mon Sep 22 04:17:05 EDT 2014


Dear Team,

I'm trying to transplant kinit (for AS, the lastest version *1.12.2*) into
a daemon program. But when I tested the stability of this feature (by
infinite loop), a memory leak problem was found. And there're some clues
below which may be helpful:

1. When I remove "*pkinit.so*", there will not be memory leak. So I guess
the problem is only associated with pkinit plugin.

2. I also tried to use *valgrind *to locate the problem (both my program
and standard kinit). And the main report is below:
        $valgrind kinit *username *(and then type the password)
                          ...

* 57,328 (176 direct, 57,152 indirect) bytes in 1 blocks are definitely
lost in loss record 568 of 568*

*    at 0x4C2AB80: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)*

*    by 0x6842D32: ???*

*    by 0x68C88EF: ???*

*    by 0x68CADD6: ???*

*    by 0x68CB0CB: ???*

*    by 0x68CAB0A: ???*

*    by 0x68CB34F: ???*

*    by 0x68CC3D8: ???*

*    by 0x65D0E00: ???*

*    by 0x65CAEB3: ???*

*    by 0x65C6D77: ???*

*    by 0x50DC9C9: k5_init_preauth_context (preauth2.c:154)*

    Here, the "*???*" in the middle may be derived from dlopen-ing shared
object, and I can't trace it deeply.

Would you please fix it ASAP? Thanks.

Best Regards,

Sherice


More information about the krbdev mailing list