Memory leak in gss_init_sec_context when using spnego mechanism

Markus Moeller huaraz at moeller.plus.com
Tue Jul 3 19:22:47 EDT 2007


If I use gss_init_sec_context (rel 1.6.1) to create a gssapi token with 
gss_mech set to

static gss_OID_desc _gss_mech_spnego  = {6, (void 
*)"\x2b\x06\x01\x05\x05\x02"};
gss_OID gss_mech_spnego = &_gss_mech_spnego;

I have the below memory leaks. If I use gss_mech = GSS_C_NO_OID I don't have 
any leak.  Is this a known problem ?

  major_status = gss_init_sec_context(&minor_status,
                                      GSS_C_NO_CREDENTIAL,
                                      &gss_context,
                                      server_name,
                                      gss_mech,
                                      0,
                                      0,
                                      GSS_C_NO_CHANNEL_BINDINGS,
                                      &input_token,
                                      NULL,
                                      &output_token,
                                      NULL,
                                      NULL);


==9846== 29 (12 direct, 17 indirect) bytes in 1 blocks are definitely lost 
in loss record 12 of 36
==9846==    at 0x40235B5: malloc (in 
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==9846==    by 0x4034663: gss_init_sec_context (g_init_sec_context.c:183)
==9846==    by 0x4052DA9: init_ctx_call_init (spnego_mech.c:687)
==9846==    by 0x4052FF9: spnego_gss_init_sec_context (spnego_mech.c:801)
==9846==    by 0x403473E: gss_init_sec_context (g_init_sec_context.c:211)


==9846== 1,282 bytes in 1 blocks are definitely lost in loss record 35 of 36
==9846==    at 0x40235B5: malloc (in 
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==9846==    by 0x4046673: make_ap_req_v1 (init_sec_context.c:320)
==9846==    by 0x4046D74: new_connection (init_sec_context.c:561)
==9846==    by 0x4047C95: krb5_gss_init_sec_context (init_sec_context.c:943)
==9846==    by 0x404D080: k5glue_init_sec_context (krb5_gss_glue.c:675)
==9846==    by 0x403473E: gss_init_sec_context (g_init_sec_context.c:211)
==9846==    by 0x4052DA9: init_ctx_call_init (spnego_mech.c:687)
==9846==    by 0x4052FF9: spnego_gss_init_sec_context (spnego_mech.c:801)
==9846==    by 0x403473E: gss_init_sec_context (g_init_sec_context.c:211)


Thank you
Markus 






More information about the Kerberos mailing list