SecurityTracker.com
Keep Track of the Latest Vulnerabilities
with SecurityTracker!
    Home    |    View Topics    |    Search    |    Contact Us    |    Help    |   

SecurityTracker
Archives


Welcome to SecurityTracker!
 
Click to Sign Up
Sign Up
Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
Instant Alerts
Buy our Premium Vulnerability Notification Service to receive customized, instant alerts
Affiliates
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
Partners
Become a Partner and License Our Database or Notification Service
Report a Bug
Report a vulnerability that you have found to SecurityTracker
bugs
@
securitytracker.com

Sign Up!





Category:  Application (Security)  >  Kerberos Vendors:  MIT
MIT krb5 KDC Buffer Overflow in 'do_as_req' and 'do_tgs_req' May Let Remote Users Execute Arbitrary Code
SecurityTracker Alert ID:  1014460
SecurityTracker URL:  http://securitytracker.com/id?1014460
CVE Reference:  CVE-2005-1174 ,  CVE-2005-1175   (Links to External Site)
Updated:  Jun 1 2006
Original Entry Date:  Jul 12 2005
Impact:  Execution of arbitrary code via network, User access via network
Fix Available:  Yes   Vendor Confirmed:  Yes  
Version(s): krb5-1.4.1 and prior versions
Description:  Two vulnerabilities were reported in the MIT krb5 Key Distribution Center (KDC) implementation. A remote user may be able to execute arbitrary code on the target system.

A remote user can send a specially crafted TCP connection to cause the KDC to attempt to free random memory and corrupt the heap [CVE: CAN-2005-1174]. This can cause denial of service conditions. Systems that accept TCP connections are affected.

A remote user can send the same kind of request via TCP or UDP to trigger a single-byte heap overflow [CVE: CAN-2005-1175]. The remote user may be able to execute arbitrary code.

The vendor reports that exploitation of these vulnerabilities is believed to be difficult.

The vulnerabilities reside in kdc/do_as_req.c' and 'kdc/do_tgs_req.c'.

The vendor credits Daniel Wachdorf with reporting these vulnerabilities.

Impact:  A remote user may be able to execute arbitrary code on the KDC host, potentially compromising an entire Kerberos realm.
Solution:  The vendor is releasing a fixed version (krb5-1.4.2), available at:

http://web.mit.edu/kerberos/index.html

Also, the following patch is available:

http://web.mit.edu/kerberos/advisories/2005-002-patch_1.4.1.txt

Sun has issued a fix for Sun Solaris:

http://sunsolve.sun.com/search/document .do?assetkey=1-26-101809-1

Vendor URL:  web.mit.edu/kerberos/advisories/MITKRB5-SA-2005-002-kdc.txt (Links to External Site)
Cause:  Boundary error
Underlying OS:  Linux (Any), UNIX (Any)

Message History:   This archive entry has one or more follow-up message(s) listed below.
Jul 12 2005 (Red Hat Issues Fix) MIT krb5 KDC Buffer Overflow in 'do_as_req' and 'do_tgs_req' May Let Remote Users Execute Arbitrary Code   (bugzilla@redhat.com)
Red Hat has released a fix.
Jul 12 2005 (Red Hat Issues Fix) MIT krb5 KDC Buffer Overflow in 'do_as_req' and 'do_tgs_req' May Let Remote Users Execute Arbitrary Code   (bugzilla@redhat.com)
Red Hat has released a fix.
Jul 13 2005 (Sun Issues Fix) MIT krb5 KDC Buffer Overflow in 'do_as_req' and 'do_tgs_req' May Let Remote Users Execute Arbitrary Code
Sun has issued a final fix.
Aug 16 2005 (Apple Issues Fix) MIT krb5 KDC Buffer Overflow in 'do_as_req' and 'do_tgs_req' May Let Remote Users Execute Arbitrary Code   (Apple Product Security <product-security@apple.com>)
Apple has issued a fix for Mac OS X 10.4.2.
Jun 1 2006 (IBM Issues Fix for IBM DCE) MIT krb5 KDC Buffer Overflow in 'do_as_req' and 'do_tgs_req' May Let Remote Users Execute Arbitrary Code
IBM has issued a fix for IBM DCE.



 Source Message Contents

Date:  Tue, 12 Jul 2005 14:39:11 -0400
Subject:  [none]

 
 
-----BEGIN PGP SIGNED MESSAGE-----
 
                 MIT krb5 Security Advisory 2005-002
 
Original release: 2005-07-12
 
Topic: buffer overflow, heap corruption in KDC
 
Severity: CRITICAL
 
SUMMARY
=======
 
The MIT krb5 Key Distribution Center (KDC) implementation can corrupt
the heap by attempting to free memory at a random address when it
receives a certain unlikely (but valid) request via a TCP connection.
This attempt to free unallocated memory can result in a KDC crash and
consequent denial of service.  [CAN-2005-1174, VU#259798]
 
Additionally, the same request, when received by the KDC via either
TCP or UDP, can trigger a bug in the krb5 library which results in a
single-byte overflow of a heap buffer.  Application servers are
vulnerable to a highly improbable attack, provided that the attacker
controls a realm sharing a cross-realm key with the target
realm. [CAN-2005-1175, VU#885830]
 
An unauthenticated attacker may be able to use these vulnerabilities
to execute arbitrary code on the KDC host, potentially compromising an
entire Kerberos realm.  No exploit code is known to exist at this
time.  Exploitation of these vulnerabilities is believed to be
difficult.
 
IMPACT
======
 
An unauthenticated attacker may be able to execute arbitrary code on
the KDC host, potentially compromising an entire Kerberos realm.  An
unsuccessful attack against the heap corruption vulnerability may
result in a denial of service by crashing the KDC process.
 
AFFECTED SOFTWARE
=================
 
* [CAN-2005-1174] affects the KDC implementation in all MIT krb5
  releases supporting TCP client connections to the KDC.  This
  includes krb5-1.3 and later releases, up to and including
  krb5-1.4.1.
 
* [CAN-2005-1175] affects KDC implementations and application servers
  in all MIT krb5 releases, up to and including krb5-1.4.1.
  Third-party application servers which use MIT krb5 are also
  affected.
 
FIXES
=====
 
* The upcoming krb5-1.4.2 release will have fixes for these
  vulnerabilities.
 
* WORKAROUNDS: Disabling TCP support in the KDC avoids one
  vulnerability [CAN-2005-1174].  The single-byte overflow
  [CAN-2005-1175] is still possible even without KDC TCP support
  enabled.  Running the KDC from init or from some similar automatic
  respawning facility may reduce the durations of denials of service,
  but this approach may make it difficult to detect deliberate attacks
  targeted at code execution.
 
* Apply the patch at:
 
  http://web.mit.edu/kerberos/advisories/2005-002-patch_1.4.1.txt
 
  The associated detached PGP signature is at:
 
  http://web.mit.edu/kerberos/advisories/2005-002-patch_1.4.1.txt.asc
 
  The patch was generated against the krb5-1.4.1 release.  It may
  apply, with some offset, to earlier releases.  On releases prior to
  krb5-1.3, only the patch to lib/krb5/krb/unparse.c should be
  necessary.
 
REFERENCES
==========
 
This announcement and related security advisories may be found on the
MIT Kerberos security advisory page at:
 
        http://web.mit.edu/kerberos/advisories/index.html
 
The main MIT Kerberos web page is at:
 
        http://web.mit.edu/kerberos/index.html
 
CVE: CAN-2005-1174
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1174
 
CERT: VU#259798
http://www.kb.cert.org/vuls/id/259798
 
CVE: CAN-2005-1175
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1175
 
CERT: VU#885830
http://www.kb.cert.org/vuls/id/885830
 
ACKNOWLEDGMENTS
===============
 
Thanks to Daniel Wachdorf for reporting these vulnerabilities.
 
DETAILS
=======
 
Kerberos 5 principal names may have an arbitrary number of components.
The krb5_unparse_name() function in the MIT krb5 library converts an
internal representation of a Kerberos principal name into a
human-readable string.  The internal representation might have
originated from the decoding of a Kerberos protocol message.
 
The single-byte overflow occurs whenever the krb5_unparse_name()
function is called on a principal name having zero components.  The
function writes a null byte to an address one beyond the end of a
buffer allocated my malloc().  The corresponding krb5_parse_name()
function never generates an internal representation having zero
components; instead, it generates at least one zero-length component.
The current string representation form of Kerberos principal names has
some ambiguity between a zero-component principal name and a
one-component principal name having a zero-length single component.
 
Application servers which call krb5_unparse_name(), directly or
indirectly, are vulnerable to the single-byte overflow in
krb5_unparse_name(), provided that the attacker controls a realm which
shares a cross-realm key with the target realm.  This enables the
attacker to use a cross-realm ticket for a zero-component client
principal name, which the application server will then pass to
krb5_unparse_name(), triggering the single-byte overflow.
 
For this attack to succeed, the attacker needs access to a KDC in the
target realm which will create a ticket for a zero-component client
principal name.  Since the current MIT krb5 KDC implementation will
refuse to create such a ticket, the attack is unlikely to succeed
unless the implementation has been altered to allow the issuance of
tickets for zero-component client principal names.
 
When the KDC fails to find the principal with a zero-component name in
its database (such a principal is very unlikely to exist in most
databases, as there are extremely few uses for such a principal), it
attempts to encode an error packet containing the offending principal
name, using prepare_error_as() or prepare_error_tgs().  This encoding
attempt fails inside encode_krb5_error(), since the ASN.1 encoder
function asn1_encode_principal_name() interprets the internal
representation of a zero-component principal name as an error
condition.
 
encode_krb5_error() does not allocate an output buffer when it
encounters an error condition.  While the UDP request handling code in
kdc/network.c:process_packet() does not attempt to free the output
buffer containing the encoded message when it encounters an error, the
TCP request handling code in process does free the buffer inside
kill_tcp_connection(), which attempts to free unallocated memory
pointed to by an uninitialized pointer.
 
REVISION HISTORY
================
 
2005-05-12      original release
 
Copyright (C) 2005 Massachusetts Institute of Technology
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (SunOS)
 
iQCVAwUBQtMbCabDgE/zdoE9AQFo9QP5AZMbr0YGmyzYbARTqFq+Lt+FYbfQ7XC/
c1hqTfsTkN0Mfh1I5d6dTjhXQT6kfN+EdNYfPhY+4LANB5CW9xe9BARPcW9i2ftt
xSTIODrD6LdNtOCCut1ha3T5tcV5GodvXzj7dSClde29j0IJR6dBcigfvR4mAygw
/U7r46obgM0=
=SnqK
-----END PGP SIGNATURE-----
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us   |    Help

Copyright 2006, SecurityGlobal.net LLC