Memory leak or programing error
Markus Moeller
huaraz at moeller.plus.com
Wed Aug 26 19:27:23 EDT 2009
Some more memory leaks in version 1.7
GSSAPI input token no error
gssapi_auth_test-mit-1.7.val:==12881== definitely lost: 21 bytes in 1
blocks.
gssapi_auth_test-mit-1.7.val:==12881== still reachable: 1,081 bytes in 5
blocks.
gssapi_auth_test-mit-1.7-2.val:==12883== definitely lost: 42 bytes in 2
blocks.
gssapi_auth_test-mit-1.7-2.val:==12883== still reachable: 1,081 bytes in
5 blocks.
==13113== 42 bytes in 2 blocks are definitely lost in loss record 5 of 6
==13113== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13113== by 0x41D846F: strdup (in /lib/libc-2.9.so)
==13113== by 0x421CB43: (within /lib/libc-2.9.so)
==13113== by 0x421F40E: getaddrinfo (in /lib/libc-2.9.so)
==13113== by 0x42C50A2: my_fake_getaddrinfo (fake-addrinfo.c:315)
==13113== by 0x40C1FF6: krb5_sname_to_principal (sn2princ.c:112)
==13113== by 0x40416A1: krb5_gss_import_name (import_name.c:99)
==13113== by 0x40363AB: gssint_import_internal_name (g_glue.c:306)
==13113== by 0x4034022: gss_add_cred (g_acquire_cred.c:383)
==13113== by 0x4034643: gss_acquire_cred (g_acquire_cred.c:198)
==13113== by 0x80493CF: main (gssapi_auth_test.c:223)
SPNEGO input token no error
gssapi_auth_test-mit-1.7_spnego.val:==12889== definitely lost: 21 bytes
in 1 blocks.
gssapi_auth_test-mit-1.7_spnego.val:==12889== still reachable: 1,081
bytes in 5 blocks.
gssapi_auth_test-mit-1.7_spnego-2.val:==12891== definitely lost: 42 bytes
in 2 blocks.
gssapi_auth_test-mit-1.7_spnego-2.val:==12891== still reachable: 1,081
bytes in 5 blocks.
==13113== 42 bytes in 2 blocks are definitely lost in loss record 5 of 6
==13113== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13113== by 0x41D846F: strdup (in /lib/libc-2.9.so)
==13113== by 0x421CB43: (within /lib/libc-2.9.so)
==13113== by 0x421F40E: getaddrinfo (in /lib/libc-2.9.so)
==13113== by 0x42C50A2: my_fake_getaddrinfo (fake-addrinfo.c:315)
==13113== by 0x40C1FF6: krb5_sname_to_principal (sn2princ.c:112)
==13113== by 0x40416A1: krb5_gss_import_name (import_name.c:99)
==13113== by 0x40363AB: gssint_import_internal_name (g_glue.c:306)
==13113== by 0x4034022: gss_add_cred (g_acquire_cred.c:383)
==13113== by 0x4034643: gss_acquire_cred (g_acquire_cred.c:198)
==13113== by 0x80493CF: main (gssapi_auth_test.c:223)
GSSAPI input token and replay error:
gssapi_auth_test-mit-1.7-fail.val:==12900== definitely lost: 63 bytes in
3 blocks.
gssapi_auth_test-mit-1.7-fail.val:==12900== still reachable: 1,113 bytes
in 7 blocks.
gssapi_auth_test-mit-1.7-fail-2.val:==12903== definitely lost: 84 bytes
in 4 blocks.
gssapi_auth_test-mit-1.7-fail-2.val:==12903== still reachable: 1,113
bytes in 7 blocks.
==13135== 84 bytes in 4 blocks are definitely lost in loss record 5 of 6
==13135== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13135== by 0x41D846F: strdup (in /lib/libc-2.9.so)
==13135== by 0x421CB43: (within /lib/libc-2.9.so)
==13135== by 0x421F40E: getaddrinfo (in /lib/libc-2.9.so)
==13135== by 0x42C50A2: my_fake_getaddrinfo (fake-addrinfo.c:315)
==13135== by 0x40C1FF6: krb5_sname_to_principal (sn2princ.c:112)
==13135== by 0x40416A1: krb5_gss_import_name (import_name.c:99)
==13135== by 0x40363AB: gssint_import_internal_name (g_glue.c:306)
==13135== by 0x4034022: gss_add_cred (g_acquire_cred.c:383)
==13135== by 0x4034643: gss_acquire_cred (g_acquire_cred.c:198)
==13135== by 0x80493CF: main (gssapi_auth_test.c:223)
SPNEGO input token and replay error:
gssapi_auth_test-mit-1.7_spnego-fail.val:==12914== definitely lost: 191
bytes in 5 blocks.
gssapi_auth_test-mit-1.7_spnego-fail.val:==12914== indirectly lost: 96
bytes in 6 blocks.
gssapi_auth_test-mit-1.7_spnego-fail.val:==12914== still reachable: 1,113
bytes in 7 blocks.
gssapi_auth_test-mit-1.7_spnego-fail-2.val:==12917== definitely lost: 276
bytes in 7 blocks.
gssapi_auth_test-mit-1.7_spnego-fail-2.val:==12917== indirectly lost: 144
bytes in 9 blocks.
gssapi_auth_test-mit-1.7_spnego-fail-2.val:==12917== still reachable:
1,113 bytes in 7 blocks.
==13147== 24 bytes in 3 blocks are indirectly lost in loss record 2 of 10
==13147== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13147== by 0x4031CFE: generic_gss_copy_oid (oid_ops.c:96)
==13147== by 0x4050F81: spnego_gss_accept_sec_context
(spnego_mech.c:2792)
==13147== by 0x403392D: gss_accept_sec_context
(g_accept_sec_context.c:196)
==13147== by 0x8049486: main (gssapi_auth_test.c:232)
==13147==
==13147== 27 bytes in 3 blocks are indirectly lost in loss record 5 of 10
==13147== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13147== by 0x4031D13: generic_gss_copy_oid (oid_ops.c:102)
==13147== by 0x4050F81: spnego_gss_accept_sec_context
(spnego_mech.c:2792)
==13147== by 0x403392D: gss_accept_sec_context
(g_accept_sec_context.c:196)
==13147== by 0x8049486: main (gssapi_auth_test.c:232)
==13147==
==13147== 84 bytes in 4 blocks are definitely lost in loss record 7 of 10
==13147== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13147== by 0x41D846F: strdup (in /lib/libc-2.9.so)
==13147== by 0x421CB43: (within /lib/libc-2.9.so)
==13147== by 0x421F40E: getaddrinfo (in /lib/libc-2.9.so)
==13147== by 0x42C50A2: my_fake_getaddrinfo (fake-addrinfo.c:315)
==13147== by 0x40C1FF6: krb5_sname_to_principal (sn2princ.c:112)
==13147== by 0x40416A1: krb5_gss_import_name (import_name.c:99)
==13147== by 0x40363AB: gssint_import_internal_name (g_glue.c:306)
==13147== by 0x4034022: gss_add_cred (g_acquire_cred.c:383)
==13147== by 0x4034643: gss_acquire_cred (g_acquire_cred.c:198)
==13147== by 0x80493CF: main (gssapi_auth_test.c:223)
==13147==
==13147== 93 bytes in 3 blocks are indirectly lost in loss record 8 of 10
==13147== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13147== by 0x4050C9B: spnego_gss_accept_sec_context
(spnego_mech.c:2614)
==13147== by 0x403392D: gss_accept_sec_context
(g_accept_sec_context.c:196)
==13147== by 0x8049486: main (gssapi_auth_test.c:232)
==13147==
==13147== 336 (192 direct, 144 indirect) bytes in 3 blocks are definitely
lost in loss record 9 of 10
==13147== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13147== by 0x404FB1E: create_spnego_ctx (spnego_mech.c:389)
==13147== by 0x4050FB8: spnego_gss_accept_sec_context
(spnego_mech.c:1323)
==13147== by 0x403392D: gss_accept_sec_context
(g_accept_sec_context.c:196)
==13147== by 0x8049486: main (gssapi_auth_test.c:232)
GSSAPI input token and no error and no replay cache:
gssapi_auth_test-mit-1.7-noreplay-cache.val:==12923== definitely lost: 57
bytes in 2 blocks.
gssapi_auth_test-mit-1.7-noreplay-cache.val:==12923== still reachable:
1,081 bytes in 5 blocks.
gssapi_auth_test-mit-1.7-2-noreplay-cache.val:==12925== definitely lost:
114 bytes in 4 blocks.
gssapi_auth_test-mit-1.7-2-noreplay-cache.val:==12925== still reachable:
1,081 bytes in 5 blocks.
==13165== 42 bytes in 2 blocks are definitely lost in loss record 5 of 7
==13165== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13165== by 0x41D846F: strdup (in /lib/libc-2.9.so)
==13165== by 0x421CB43: (within /lib/libc-2.9.so)
==13165== by 0x421F40E: getaddrinfo (in /lib/libc-2.9.so)
==13165== by 0x42C50A2: my_fake_getaddrinfo (fake-addrinfo.c:315)
==13165== by 0x40C1FF6: krb5_sname_to_principal (sn2princ.c:112)
==13165== by 0x40416A1: krb5_gss_import_name (import_name.c:99)
==13165== by 0x40363AB: gssint_import_internal_name (g_glue.c:306)
==13165== by 0x4034022: gss_add_cred (g_acquire_cred.c:383)
==13165== by 0x4034643: gss_acquire_cred (g_acquire_cred.c:198)
==13165== by 0x80493CF: main (gssapi_auth_test.c:223)
==13165==
==13165== 72 bytes in 2 blocks are definitely lost in loss record 6 of 7
==13165== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13165== by 0x40B1BAB: krb5_rc_resolve_full (rc_base.c:156)
==13165== by 0x40AF9B9: krb5_get_server_rcache (srv_rcache.c:73)
==13165== by 0x403ECE8: krb5_gss_acquire_cred (acquire_cred.c:197)
==13165== by 0x403409E: gss_add_cred (g_acquire_cred.c:403)
==13165== by 0x4034643: gss_acquire_cred (g_acquire_cred.c:198)
==13165== by 0x80493CF: main (gssapi_auth_test.c:223)
SPNEGO input token and no error and no replay cache:
gssapi_auth_test-mit-1.7_spnego-noreplay-cache.val:==12931== definitely
lost: 57 bytes in 2 blocks.
gssapi_auth_test-mit-1.7_spnego-noreplay-cache.val:==12931== still
reachable: 1,081 bytes in 5 blocks.
gssapi_auth_test-mit-1.7_spnego-2-noreplay-cache.val:==12933== definitely
lost: 114 bytes in 4 blocks.
gssapi_auth_test-mit-1.7_spnego-2-noreplay-cache.val:==12933== still
reachable: 1,081 bytes in 5 blocks.
==13165== 42 bytes in 2 blocks are definitely lost in loss record 5 of 7
==13165== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13165== by 0x41D846F: strdup (in /lib/libc-2.9.so)
==13165== by 0x421CB43: (within /lib/libc-2.9.so)
==13165== by 0x421F40E: getaddrinfo (in /lib/libc-2.9.so)
==13165== by 0x42C50A2: my_fake_getaddrinfo (fake-addrinfo.c:315)
==13165== by 0x40C1FF6: krb5_sname_to_principal (sn2princ.c:112)
==13165== by 0x40416A1: krb5_gss_import_name (import_name.c:99)
==13165== by 0x40363AB: gssint_import_internal_name (g_glue.c:306)
==13165== by 0x4034022: gss_add_cred (g_acquire_cred.c:383)
==13165== by 0x4034643: gss_acquire_cred (g_acquire_cred.c:198)
==13165== by 0x80493CF: main (gssapi_auth_test.c:223)
==13165==
==13165== 72 bytes in 2 blocks are definitely lost in loss record 6 of 7
==13165== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13165== by 0x40B1BAB: krb5_rc_resolve_full (rc_base.c:156)
==13165== by 0x40AF9B9: krb5_get_server_rcache (srv_rcache.c:73)
==13165== by 0x403ECE8: krb5_gss_acquire_cred (acquire_cred.c:197)
==13165== by 0x403409E: gss_add_cred (g_acquire_cred.c:403)
==13165== by 0x4034643: gss_acquire_cred (g_acquire_cred.c:198)
==13165== by 0x80493CF: main (gssapi_auth_test.c:223)
GSSAPI input token and skew error and no replay cache:
gssapi_auth_test-mit-1.7-noreplay-cache-fail.val:==12969== definitely
lost: 114 bytes in 4 blocks.
gssapi_auth_test-mit-1.7-noreplay-cache-fail.val:==12969== still
reachable: 1,114 bytes in 7 blocks.
gssapi_auth_test-mit-1.7-noreplay-cache-fail-2.val:==12971== definitely
lost: 171 bytes in 6 blocks.
gssapi_auth_test-mit-1.7-noreplay-cache-fail-2.val:==12971== still
reachable: 1,114 bytes in 7 blocks.
==13235== 63 bytes in 3 blocks are definitely lost in loss record 5 of 7
==13235== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13235== by 0x41D846F: strdup (in /lib/libc-2.9.so)
==13235== by 0x421CB43: (within /lib/libc-2.9.so)
==13235== by 0x421F40E: getaddrinfo (in /lib/libc-2.9.so)
==13235== by 0x42C50A2: my_fake_getaddrinfo (fake-addrinfo.c:315)
==13235== by 0x40C1FF6: krb5_sname_to_principal (sn2princ.c:112)
==13235== by 0x40416A1: krb5_gss_import_name (import_name.c:99)
==13235== by 0x40363AB: gssint_import_internal_name (g_glue.c:306)
==13235== by 0x4034022: gss_add_cred (g_acquire_cred.c:383)
==13235== by 0x4034643: gss_acquire_cred (g_acquire_cred.c:198)
==13235== by 0x80493CF: main (gssapi_auth_test.c:223)
==13235==
==13235== 108 bytes in 3 blocks are definitely lost in loss record 6 of 7
==13235== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13235== by 0x40B1BAB: krb5_rc_resolve_full (rc_base.c:156)
==13235== by 0x40AF9B9: krb5_get_server_rcache (srv_rcache.c:73)
==13235== by 0x403ECE8: krb5_gss_acquire_cred (acquire_cred.c:197)
==13235== by 0x403409E: gss_add_cred (g_acquire_cred.c:403)
==13235== by 0x4034643: gss_acquire_cred (g_acquire_cred.c:198)
==13235== by 0x80493CF: main (gssapi_auth_test.c:223)
SPNEGO input token and skew error and no replay cache:
gssapi_auth_test-mit-1.7_spnego-noreplay-cache-fail.val:==12978==
definitely lost: 114 bytes in 4 blocks.
gssapi_auth_test-mit-1.7_spnego-noreplay-cache-fail.val:==12978== still
reachable: 1,114 bytes in 7 blocks.
gssapi_auth_test-mit-1.7_spnego-noreplay-cache-fail-2.val:==12980==
definitely lost: 171 bytes in 6 blocks.
gssapi_auth_test-mit-1.7_spnego-noreplay-cache-fail-2.val:==12980== still
reachable: 1,114 bytes in 7 blocks.
==13235== 63 bytes in 3 blocks are definitely lost in loss record 5 of 7
==13235== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13235== by 0x41D846F: strdup (in /lib/libc-2.9.so)
==13235== by 0x421CB43: (within /lib/libc-2.9.so)
==13235== by 0x421F40E: getaddrinfo (in /lib/libc-2.9.so)
==13235== by 0x42C50A2: my_fake_getaddrinfo (fake-addrinfo.c:315)
==13235== by 0x40C1FF6: krb5_sname_to_principal (sn2princ.c:112)
==13235== by 0x40416A1: krb5_gss_import_name (import_name.c:99)
==13235== by 0x40363AB: gssint_import_internal_name (g_glue.c:306)
==13235== by 0x4034022: gss_add_cred (g_acquire_cred.c:383)
==13235== by 0x4034643: gss_acquire_cred (g_acquire_cred.c:198)
==13235== by 0x80493CF: main (gssapi_auth_test.c:223)
==13235==
==13235== 108 bytes in 3 blocks are definitely lost in loss record 6 of 7
==13235== at 0x4027DDE: malloc (in
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==13235== by 0x40B1BAB: krb5_rc_resolve_full (rc_base.c:156)
==13235== by 0x40AF9B9: krb5_get_server_rcache (srv_rcache.c:73)
==13235== by 0x403ECE8: krb5_gss_acquire_cred (acquire_cred.c:197)
==13235== by 0x403409E: gss_add_cred (g_acquire_cred.c:403)
==13235== by 0x4034643: gss_acquire_cred (g_acquire_cred.c:198)
==13235== by 0x80493CF: main (gssapi_auth_test.c:223)
Regards
Markus
"Greg Hudson" <ghudson at MIT.EDU> wrote in message
news:1251143609.20047.114.camel at ray...
> The KRB5RCACHETYPE=none leaks were fixed by Ken Raeburn in r22417 which
> should make it to release in 1.7.1.
>
> A brief look at the spnego code suggests those memory leaks are still
> present in the trunk, possibly along with other leaks. I will work on
> cleaning this up; please send me (private mail is fine) the base64 files
> you are using.
>
> Thanks for the investigation work you've done.
>
>
> ________________________________________________
> Kerberos mailing list Kerberos at mit.edu
> https://mailman.mit.edu/mailman/listinfo/kerberos
>
More information about the Kerberos
mailing list