search menu icon-carat-right cmu-wordmark

CERT Coordination Center

MIT Kerberos 5 ASN.1 decoding function asn1buf_skiptail() does not properly terminate loop

Vulnerability Note VU#550464

Original Release Date: 2004-09-02 | Last Revised: 2004-09-03

Overview

The asn1buf_skiptail() function in the MIT Kerberos 5 library does not properly terminate a loop, allowing an unauthenticated, remote attacker to cause a denial of service in a Kerberos Distribution Center (KDC), application server, or Kerberos client.

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). The Basic Encoding Rules (BER) describe how to represent the values of ASN.1 types in byte strings. The MIT Kerberos 5 library function asn1buf_skiptail() contains a loop that does not properly check either the end of a buffer or the position of a pointer into the buffer. A specially crafted BER encoding in an ASN.1 sequence can cause asn1buf_skiptail() to enter an infinite loop, resulting in a denial of service. MITKRB5-SA-2004-003 provides further detail:

The ASN.1 decoder in the MIT krb5 library handles indefinite-length
BER encodings for the purpose of backwards compatibility with some
non-conformant implementations. The ASN.1 decoders call
asn1buf_sync() to skip any trailing unrecognized fields in the
encoding of a SEQUENCE type.  asn1buf_sync() calls asn1buf_skiptail()
if the ASN.1 SEQUENCE type being decoded was encoded with an
indefinite length.  asn1buf_sync() is provided with a prefetched BER
tag; a placeholder tag is provided by the prefetching code in the case
where there is are no more octets in a sub-encoding.

The loop in asn1buf_skiptail() which attempts to skip trailing
sub-encodings of an indefinite-length SEQUENCE type does not properly
check for end-of-subbuffer conditions or for the placeholder tag,
leading to an infinite loop.   Valid BER encodings cannot cause this
condition; however, it is trivial to construct a corrupt encoding
which will trigger the infinite loop.

Impact

An unauthenticated, remote attacker could cause a denial of service on a KDC or application server. An attacker who is able to impersonate a KDC or application server may be able to cause a denial of service on Kerberos clients.

Solution

Apply a patch

Apply the appropriate patch(es) referenced in MITKRB5-SA-2004-003 or specified by your vendor.

Upgrade

According to MITKRB5-SA-2004-003, "The upcoming krb5-1.3.5 release will contain fixes for these problems."


Restrict access

Depending on network architecture, it may be practical to restrict access to KDC servers (88/udp) from untrusted networks such as the Internet. Due to network application requirements, it may be possible, but less practical, to limit access from Kerberos clients to trusted KDC and application servers. While these workarounds will help to limit the source of attacks, they will not prevent attacks from trusted hosts or networks or attackers who can successfully spoof their source addresses.

Vendor Information

550464
 

Cisco Systems Inc. Affected

Notified:  July 21, 2004 Updated: September 03, 2004

Status

Affected

Vendor Statement

We have not received a statement from the vendor.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see Cisco Security Advisory: Vulnerabilities in Kerberos 5 Implementation (Document ID: 61720).

If you have feedback, comments, or additional information about this vulnerability, please send us email.

MIT Kerberos Development Team Affected

Updated:  September 02, 2004

Status

Affected

Vendor Statement

We have not received a statement from the vendor.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

Please see MITKRB5-SA-2004-003.

If you have feedback, comments, or additional information about this vulnerability, please send us email.

CyberSafe Not Affected

Updated:  September 02, 2004

Status

Not Affected

Vendor Statement

The CyberSafe products listed below are not vulnerable.

    • CyberSafe Challenger 5.2.8 (this is the same code used within CISCO IOS)
    • TrustBroker 2.0, 2.1
    • ActiveTRUST 3.0, 4.0
    • TrustBroker Application Security SDK & Runtime Library 3.1.0
    • TrustBroker Secure Client 4.1.

    Vendor Information

    The vendor has not provided us with any further information regarding this vulnerability.

    Addendum

    The CERT/CC has no additional comments at this time.

    If you have feedback, comments, or additional information about this vulnerability, please send us email.


CVSS Metrics

Group Score Vector
Base
Temporal
Environmental

References

Acknowledgements

Thanks to Tom Yu and the MIT Kerberos Development Team for reporting this vulnerability and coordinating with vendors. MITKRB5-SA-2004-003 acknowledges Will Fiveash and Nico Williams.

This document was written by Art Manion.

Other Information

CVE IDs: CVE-2004-0644
Severity Metric: 16.44
Date Public: 2004-08-31
Date First Published: 2004-09-02
Date Last Updated: 2004-09-03 20:22 UTC
Document Revision: 18

Sponsored by CISA.