[16760] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

[krbdev.mit.edu #9016] [Comment] Memory leak in krb5_gss_inquire_cred

daemon@ATHENA.MIT.EDU (Greg Hudson via RT)
Fri Jul 16 12:14:04 2021

From: "Greg Hudson via RT" <rt-comment@kerborg-prod-app-1.mit.edu>
In-Reply-To: <20210716103117.GC13636@astro.su.se>
Message-ID: <rt-4.4.3-2-4111412-1626451989-911.9016-8-0@kerborg-prod-app-1.mit.edu>
To: "AdminCc of krbdev.mit.edu Ticket #9016":;
Date: Fri, 16 Jul 2021 12:13:09 -0400
MIME-Version: 1.0
Reply-To: rt-comment@kerborg-prod-app-1.mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krb5-bugs-bounces@mit.edu


http://kerborg-prod-app-1.mit.edu/rt/Ticket/Display.html?id=9016
This is a comment.  It is not sent to the Requestor(s):

This bug was introduced in commit 1cd2821c19b2b95e39d5fc2f451a035585a40fa5
("Make gss-krb5 use cache collection").  In the previous code, cred could be
an owner pointer or a casted alias to cred_handle, and the default cred was
freed with "if (cred_handle == NULL) krb5_gss_release_cred(minor_status, &
cred)" along the success and failure paths.  The aforementioned commit cleans
this up by introducing defcred as the owner pointer for the obtained default
credential; however, it neglected to update the freeing code along the success
path.  Since the new code also reassigns cred_handle when obtaining a default
cred, the old code does not trigger and the default credential is not freed.

It looks like it should be possible to unify the success and failure paths,
and I may do that rather than make the trivial fix.
 

_______________________________________________
krb5-bugs mailing list
krb5-bugs@mit.edu
https://mailman.mit.edu/mailman/listinfo/krb5-bugs

home help back first fref pref prev next nref lref last post