krb5 commit [krb5-1.13]: Fix leak in FAST OTP client processing

Tom Yu tlyu at mit.edu
Fri Sep 9 14:48:12 EDT 2016


https://github.com/krb5/krb5/commit/165c99c8df06795f5c7a3a2866452a6a996f1ab7
commit 165c99c8df06795f5c7a3a2866452a6a996f1ab7
Author: Greg Hudson <ghudson at mit.edu>
Date:   Tue Jun 28 21:38:57 2016 -0400

    Fix leak in FAST OTP client processing
    
    In set_pa_data(), after encoding the OTP request and stealing the
    pointer from the resulting krb5_data object, free the krb5_data
    container.
    
    (cherry picked from commit 7029efc11525299b87b9024280ef1d9f82059ec5)
    
    ticket: 8443
    version_fixed: 1.13.7

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

diff --git a/src/lib/krb5/krb/preauth_otp.c b/src/lib/krb5/krb/preauth_otp.c
index 3de528b..37f98b2 100644
--- a/src/lib/krb5/krb/preauth_otp.c
+++ b/src/lib/krb5/krb/preauth_otp.c
@@ -830,6 +830,7 @@ set_pa_data(const krb5_pa_otp_req *req, krb5_pa_data ***pa_data_out)
         goto error;
     out[0]->contents = (krb5_octet *)tmp->data;
     out[0]->length = tmp->length;
+    free(tmp);
 
     *pa_data_out = out;
     return 0;


More information about the cvs-krb5 mailing list