Skip Menu |
 

Subject: krb5 1.7 memory leak
Date: Thu, 8 Oct 2009 17:17:01 -0400
From: "Arlene Berry" <aberry@likewise.com>
To: <krb5-bugs@mit.edu>
Download (untitled) / with headers
text/plain 1.1KiB
The enc_padata field that was added to the krb5_enc_kdc_rep_part
structure for 1.7 is being leaked. Our fix is below. It looks like the
second change was done in trunk when the S4U changes were merged.

Modified: src/lib/krb5/asn.1/asn1_k_decode.c
===================================================================
--- src/lib/krb5/asn.1/asn1_k_decode.c 2009-10-07 22:25:00 UTC (rev
37774)
+++ src/lib/krb5/asn.1/asn1_k_decode.c 2009-10-07 22:27:28 UTC (rev
37775)
@@ -668,6 +668,7 @@
krb5_free_last_req(NULL, val->last_req);
krb5_free_principal(NULL, val->server);
krb5_free_addresses(NULL, val->caddrs);
+ krb5_free_pa_data(NULL, val->enc_padata);
val->session = NULL;
val->last_req = NULL;
val->server = NULL;

Modified: src/lib/krb5/krb/kfree.c
===================================================================
--- src/lib/krb5/krb/kfree.c 2009-10-07 22:25:00 UTC (rev 37774)
+++ src/lib/krb5/krb/kfree.c 2009-10-07 22:27:28 UTC (rev 37775)
@@ -297,6 +297,7 @@
krb5_free_last_req(context, val->last_req);
krb5_free_principal(context, val->server);
krb5_free_addresses(context, val->caddrs);
+ krb5_free_pa_data(context, val->enc_padata);
free(val);
}
From: ghudson@mit.edu
Subject: SVN Commit

In asn1_decode_enc_kdc_rep_part, don't leak the enc_padata field on
invalid representations.


https://github.com/krb5/krb5/commit/9cbd0192b06df4ea10d1e06c8a36fd08ed681a53
Commit By: ghudson
Revision: 22872
Changed Files:
U trunk/src/lib/krb5/asn.1/asn1_k_decode.c
Thanks for the patch.

I've committed the part that wasn't in trunk. When pulling this up, the
part that already was in trunk (the change to kfree.c) should be applied
manually.
From: tlyu@mit.edu
Subject: SVN Commit

pull up r22872 from trunk

------------------------------------------------------------------------
r22872 | ghudson | 2009-10-09 10:21:04 -0400 (Fri, 09 Oct 2009) | 7 lines

ticket: 6571
tags: pullup
target_version: 1.7.1

In asn1_decode_enc_kdc_rep_part, don't leak the enc_padata field on
invalid representations.

https://github.com/krb5/krb5/commit/d903736aa1fd7a3b41f0c920a70e6512175295cb
Commit By: tlyu
Revision: 23638
Changed Files:
U branches/krb5-1-7/src/lib/krb5/asn.1/asn1_k_decode.c
From: tlyu@mit.edu
Subject: SVN Commit

Add manual kfree.c change missing from previous pullup.

https://github.com/krb5/krb5/commit/b82e5ef7b46fff5cbab401746fd76abf9506787d
Commit By: tlyu
Revision: 23639
Changed Files:
U branches/krb5-1-7/src/lib/krb5/krb/kfree.c