Overview
The krb5_rd_cred() function in the MIT Kerberos 5 library does not securely deallocate heap memory when decoding ASN.1 structures, resulting in a double-free vulnerability. A remote, authenticated attacker could execute arbitrary code or cause a denial of service on any system running an application that calls krb5_rd_cred(). This includes Kerberos application servers and other applications that process Kerberos authentication via the MIT Kerberos 5 library, GSSAPI, and other libraries.
Description
As described on the MIT Kerberos web site: "Kerberos is a network authentication protocol. It is designed to provide strong authentication for client/server applications by using secret-key cryptography." MIT Kerberos code is used in network applications from a variety of different vendors and is included in many UNIX and Linux distributions. Kerberos 5 protocol messages are defined using Abstract Syntax Notation One (ASN.1). When handling an error condition, the function krb5_rd_cred() free()s a memory reference returned from the ASN.1 decoding function decode_krb5_enc_cred_part(). As part of its own error handling process, the decoding function already free()d the memory reference, therefore the second free() can corrupt heap memory management structures, possibly manipulating heap memory to execute arbitrary code. This is a double-free vulnerability. Note that this vulnerability was addressed in kbr5-1.3.2. From MITKRB5-SA-2004-002: |
Impact
A remote, authenticated attacker could execute arbitrary code on a vulnerable Kerberos application server or cause a denial of service. |
Solution
Apply a patch Apply the appropriate patch(es) referenced in MITKRB5-SA-2004-002 or specified by your vendor. Note that this vulnerability does not exist in krb5-1.3.2 and later. |
|
Vendor Information
CVSS Metrics
Group | Score | Vector |
---|---|---|
Base | ||
Temporal | ||
Environmental |
References
- http://web.mit.edu/kerberos/advisories/MITKRB5-SA-2004-002-dblfree.txt
- http://web.mit.edu/kerberos/www/
- http://www.cmf.nrl.navy.mil/CCS/people/kenh/kerberos-faq.html#asn1
- http://www.itu.int/ITU-T/asn1/
- http://www.itu.int/ITU-T/studygroups/com10/languages/
- http://www.cmf.nrl.navy.mil/CCS/people/kenh/kerberos-faq.html#gssapi
- http://www.ietf.org/rfc/rfc2743.txt
- http://www.ietf.org/rfc/rfc1964.txt
- http://www.securitytracker.com/alerts/2004/Aug/1011106.html
Acknowledgements
Thanks to Tom Yu and the MIT Kerberos Development Team for reporting this vulnerability and coordinating with vendors. MITKRB5-SA-2004-002 acknowledges Joseph Galbraith and John Hawkinson.
This document was written by Art Manion.
Other Information
CVE IDs: | CVE-2004-0643 |
Severity Metric: | 10.96 |
Date Public: | 2004-08-31 |
Date First Published: | 2004-09-02 |
Date Last Updated: | 2004-09-03 20:21 UTC |
Document Revision: | 30 |