pull up r24705 from trunk
authorTom Yu <tlyu@mit.edu>
Tue, 15 Mar 2011 23:26:53 +0000 (23:26 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 15 Mar 2011 23:26:53 +0000 (23:26 +0000)
 ------------------------------------------------------------------------
 r24705 | tlyu | 2011-03-15 17:47:19 -0400 (Tue, 15 Mar 2011) | 8 lines

 ticket: 6881
 subject: KDC double-free when PKINIT enabled [MITKRB5-SA-2011-003 CVE-2011-0284]
 tags: pullup
 target_version: 1.9.1

 Fix a double-free condition in the KDC that can occur during an
 AS-REQ when PKINIT is enabled.

ticket: 6881
version_fixed: 1.9.1
status: resolved

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-9@24706 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/do_as_req.c

index 46b5fa1fb186ec10a99cdac372ca1cab90e25435..464cb6e443458cbd9fd03223eb9008816629dd55 100644 (file)
@@ -741,6 +741,8 @@ prepare_error_as (struct kdc_request_state *rstate, krb5_kdc_req *request,
                     pad->contents = td[size]->data;
                     pad->length = td[size]->length;
                     pa[size] = pad;
+                    td[size]->data = NULL;
+                    td[size]->length = 0;
                 }
             krb5_free_typed_data(kdc_context, td);
         }