krb5 commit [krb5-1.12]: Fix uncommon leak in krb5_init_creds_step()

Tom Yu tlyu at mit.edu
Wed Dec 9 15:26:48 EST 2015


https://github.com/krb5/krb5/commit/75bf5fce3bc38c7e397fec804a91461502bff7c4
commit 75bf5fce3bc38c7e397fec804a91461502bff7c4
Author: Greg Hudson <ghudson at mit.edu>
Date:   Sun Jul 26 13:21:47 2015 -0400

    Fix uncommon leak in krb5_init_creds_step()
    
    Release any previous value of ctx->err_padata before setting it in
    init_creds_step_reply().  It could have a prior value after a realm
    referral or retriable error.
    
    (cherry picked from commit 997eb174f5fd81747ad0ecb671f00c25951931b1)
    
    ticket: 8306 (new)
    version_fixed: 1.12.5
    status: resolved

 src/lib/krb5/krb/get_in_tkt.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c
index 96c5c3a..721f061 100644
--- a/src/lib/krb5/krb/get_in_tkt.c
+++ b/src/lib/krb5/krb/get_in_tkt.c
@@ -1443,6 +1443,8 @@ init_creds_step_reply(krb5_context context,
         ctx->request->client->type == KRB5_NT_ENTERPRISE_PRINCIPAL;
 
     if (ctx->err_reply != NULL) {
+        krb5_free_pa_data(context, ctx->err_padata);
+        ctx->err_padata = NULL;
         code = krb5int_fast_process_error(context, ctx->fast_state,
                                           &ctx->err_reply, &ctx->err_padata,
                                           &retry);


More information about the cvs-krb5 mailing list