Skip Menu |
 

Subject: memory leak in gss_accept_sec_context
Date: Thu, 28 Oct 2010 21:08:25 -0400
From: "Arlene Berry" <aberry@likewise.com>
To: <krb5-bugs@mit.edu>

The mechglue leaks the mechanism context when there’s an error.

 

--- src/lib/gssapi/mechglue/g_accept_sec_context.c      (revision 24487)

+++ src/lib/gssapi/mechglue/g_accept_sec_context.c   (working copy)

@@ -353,6 +353,12 @@

                    free(union_ctx_id->mech_type);

                    *context_handle = GSS_C_NO_CONTEXT;

                }

+             if (union_ctx_id->internal_ctx_id) {

+                 mech->gss_delete_sec_context(

+                             &temp_minor_status,

+                             &union_ctx_id->internal_ctx_id,

+                             GSS_C_NO_BUFFER);

+             }

                free(union_ctx_id);

     }

 

From: ghudson@mit.edu
Subject: SVN Commit

Don't leak the mechanism internal context when we get an error in the
mechglue's gss_accept_sec_context.

From aberry@likewise.com.


https://github.com/krb5/krb5/commit/5da01b50554199e0ea275581755af4dce5b27f6d
Commit By: ghudson
Revision: 24645
Changed Files:
U trunk/src/lib/gssapi/mechglue/g_accept_sec_context.c
From: ghudson@mit.edu
Subject: SVN Commit

Although it can't actually happen, make it more explicit that we won't
dereference a null mech in the cleanup handler of the mechglue's
gss_accept_sec_context.


https://github.com/krb5/krb5/commit/8647bcedc38882da7ea1c22c973faedc0b571ceb
Commit By: ghudson
Revision: 24701
Changed Files:
U trunk/src/lib/gssapi/mechglue/g_accept_sec_context.c
From: ghudson@mit.edu
Subject: SVN Commit

Fix a code path where mech could be used uninitialized in
gss_accept_sec_context after r24645.


https://github.com/krb5/krb5/commit/c41992eec7df41c0232de45ef19267a21b66dcaa
Commit By: ghudson
Revision: 24883
Changed Files:
U trunk/src/lib/gssapi/mechglue/g_accept_sec_context.c