Skip Menu |
 

Subject: Additional memory leaks in kdc
Download (untitled) / with headers
text/plain 2.6KiB
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...
From: ghudson@mit.edu
Subject: SVN Commit

The TGS code was not freeing authdata. This is an old leak which was
made more evident in 1.8 by the addition of ad-signedpath authdata
appearing in most tickets issued through the TGS path.


https://github.com/krb5/krb5/commit/cdb89c32a7df8fd709be8ba27756e52776e8db94
Commit By: ghudson
Revision: 23735
Changed Files:
U trunk/src/kdc/do_tgs_req.c
From: tlyu@mit.edu
Subject: SVN Commit

pull up r23735 from trunk

------------------------------------------------------------------------
r23735 | ghudson | 2010-02-18 13:49:11 -0500 (Thu, 18 Feb 2010) | 8 lines

ticket: 6659
target_version: 1.8
tags: pullup

The TGS code was not freeing authdata. This is an old leak which was
made more evident in 1.8 by the addition of ad-signedpath authdata
appearing in most tickets issued through the TGS path.

https://github.com/krb5/krb5/commit/01c6f93d0364b778391dd64bfbdfa1abab5d11a4
Commit By: tlyu
Revision: 23747
Changed Files:
U branches/krb5-1-8/src/kdc/do_tgs_req.c