[krbdev.mit.edu #6659] Additional memory leaks in kdc

Ezra Peisach via RT rt-comment at krbdev.mit.edu
Wed Feb 10 22:33:11 EST 2010


Source tree - trunk about 1.8 time frame. Revision 23715.

Used kdb5_mkdums to create 45 principals in the kdc.
Run kdc under valgrind.

Run kdc_hammer with arguments like:

./kdc5_hammer -p test -n 15 -D 3 -c MEMORY:a -v


Find memory leaks:

==1119== 2,160 bytes in 135 blocks are indirectly lost in loss record 7 of 9
==1119==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==1119==    by 0x40CD784: krb5int_copy_authdatum (authdata.c:1190)
==1119==    by 0x40D09A4: krb5_merge_authdata (copy_auth.c:92)
==1119==    by 0x40D0A90: krb5_copy_authdata (copy_auth.c:120)
==1119==    by 0x40CDAB5: krb5_encode_authdata_container (authdata_enc.c:85)
==1119==    by 0x806080F: make_ad_signedpath (kdc_authdata.c:1085)
==1119==    by 0x8060A5F: handle_signedpath_authdata (kdc_authdata.c:1184)
==1119==    by 0x806014B: handle_authdata (kdc_authdata.c:784)
==1119==    by 0x804F33F: process_tgs_req (do_tgs_req.c:739)
==1119==    by 0x804C03E: dispatch (dispatch.c:90)
==1119==    by 0x805D809: process_packet (network.c:1298)
==1119==    by 0x805E62D: service_conn (network.c:1638)

==1119== 6,210 bytes in 135 blocks are indirectly lost in loss record 8 of 9
==1119==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==1119==    by 0x40CD7BE: krb5int_copy_authdatum (authdata.c:1193)
==1119==    by 0x40D09A4: krb5_merge_authdata (copy_auth.c:92)
==1119==    by 0x40D0A90: krb5_copy_authdata (copy_auth.c:120)
==1119==    by 0x40CDAB5: krb5_encode_authdata_container (authdata_enc.c:85)
==1119==    by 0x806080F: make_ad_signedpath (kdc_authdata.c:1085)
==1119==    by 0x8060A5F: handle_signedpath_authdata (kdc_authdata.c:1184)
==1119==    by 0x806014B: handle_authdata (kdc_authdata.c:784)
==1119==    by 0x804F33F: process_tgs_req (do_tgs_req.c:739)
==1119==    by 0x804C03E: dispatch (dispatch.c:90)
==1119==    by 0x805D809: process_packet (network.c:1298)
==1119==    by 0x805E62D: service_conn (network.c:1638)
==1119==

==1119== 9,450 (1,080 direct, 8,370 indirect) bytes in 135 blocks are
definitely
 lost in loss record 9 of 9
==1119==    at 0x4004F1B: calloc (vg_replace_malloc.c:418)
==1119==    by 0x805FB21: merge_authdata (kdc_authdata.c:513)
==1119==    by 0x8060845: make_ad_signedpath (kdc_authdata.c:1092)
==1119==    by 0x8060A5F: handle_signedpath_authdata (kdc_authdata.c:1184)
==1119==    by 0x806014B: handle_authdata (kdc_authdata.c:784)
==1119==    by 0x804F33F: process_tgs_req (do_tgs_req.c:739)
==1119==    by 0x804C03E: dispatch (dispatch.c:90)
==1119==    by 0x805D809: process_packet (network.c:1298)
==1119==    by 0x805E62D: service_conn (network.c:1638)
==1119==    by 0x805E955: listen_and_process (network.c:1729)
==1119==    by 0x805B8F9: main (main.c:939)
==1119==


With -D1 - only 15 leaks...





More information about the krb5-bugs mailing list