Executive Summary

Summary
Title MIT KDC vulnerable to double-free when PKINIT enabled
Informations
Name VU#943220 First vendor Publication 2011-03-15
Vendor VU-CERT Last vendor Modification 2011-03-15
Severity (Vendor) N/A Revision M

Security-Database Scoring CVSS v3

Cvss vector : N/A
Overall CVSS Score NA
Base Score NA Environmental Score NA
impact SubScore NA Temporal Score NA
Exploitabality Sub Score NA
 
Calculate full CVSS 3.0 Vectors scores

Security-Database Scoring CVSS v2

Cvss vector : (AV:N/AC:H/Au:N/C:C/I:C/A:C)
Cvss Base Score 7.6 Attack Range Network
Cvss Impact Score 10 Attack Complexity High
Cvss Expoit Score 4.9 Authentication None Required
Calculate full CVSS 2.0 Vectors scores

Detail

Vulnerability Note VU#943220

MIT KDC vulnerable to double-free when PKINIT enabled

Overview

The KDC in releases krb5-1.7 and later are vulnerable to a double-free vulnerability if they are configured to respond to PKINIT requests.

I. Description

The MIT krb5 Security Advisory 2011-003 states:

"The MIT Kerberos 5 Key Distribution Center (KDC) daemon is vulnerable to a double-free condition if the Public Key Cryptography for Initial Authentication (PKINIT) capability is enabled, resulting in daemon crash or arbitrary code execution (which is believed to be difficult)."

II. Impact

An unauthenticated remote attacker can induce a double-free event, causing the KDC daemon to crash (denial of service), or to execute arbitrary code.

III. Solution

Apply a Patch

Upcoming releases in the krb5-1.7, krb5-1.8, and krb5-1.9 series will contain fixes. In the meantime, apply the following patch:

diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c
index 46b5fa1..464cb6e 100644
- --- a/src/kdc/do_as_req.c
+++ b/src/kdc/do_as_req.c
@@ -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);
        }


Vendor Information

VendorStatusDate NotifiedDate Updated
MIT Kerberos Development TeamAffected2011-03-152011-03-09

References

http://web.mit.edu/kerberos/advisories/MITKRB5-SA-2011-003.txt
http://web.mit.edu/kerberos/advisories/2011-003-patch.txt
http://web.mit.edu/kerberos/advisories/2011-003-patch.txt.asc

Credit

This issue was discovered by Cameron Meadors of Red Hat.

This document was written by Jared Allar.

Other Information

Date Public:2011-03-15
Date First Published:2011-03-15
Date Last Updated:2011-03-15
CERT Advisory: 
CVE-ID(s):CVE-2011-0284
NVD-ID(s):CVE-2011-0284
US-CERT Technical Alerts: 
Severity Metric:0.00
Document Revision:12

Original Source

Url : http://www.kb.cert.org/vuls/id/943220

CWE : Common Weakness Enumeration

% Id Name
100 % CWE-399 Resource Management Errors

OVAL Definitions

Definition Id: oval:org.mitre.oval:def:12810
 
Oval ID: oval:org.mitre.oval:def:12810
Title: USN-1088-1 -- krb5 vulnerability
Description: Cameron Meadors discovered that the MIT Kerberos 5 Key Distribution Center daemon is vulnerable to a double-free condition if the Public Key Cryptography for Initial Authentication capability is enabled. This could allow a remote attacker to cause a denial of service.
Family: unix Class: patch
Reference(s): USN-1088-1
CVE-2011-0284
Version: 5
Platform(s): Ubuntu 10.10
Ubuntu 9.10
Ubuntu 10.04
Product(s): krb5
Definition Synopsis:
Definition Id: oval:org.mitre.oval:def:21789
 
Oval ID: oval:org.mitre.oval:def:21789
Title: RHSA-2011:0356: krb5 security update (Important)
Description: Double free vulnerability in the prepare_error_as function in do_as_req.c in the Key Distribution Center (KDC) in MIT Kerberos 5 (aka krb5) 1.7 through 1.9, when the PKINIT feature is enabled, allows remote attackers to cause a denial of service (daemon crash) or possibly execute arbitrary code via an e_data field containing typed data.
Family: unix Class: patch
Reference(s): RHSA-2011:0356-01
CVE-2011-0284
Version: 4
Platform(s): Red Hat Enterprise Linux 6
Product(s): krb5
Definition Synopsis:
Definition Id: oval:org.mitre.oval:def:23442
 
Oval ID: oval:org.mitre.oval:def:23442
Title: ELSA-2011:0356: krb5 security update (Important)
Description: Double free vulnerability in the prepare_error_as function in do_as_req.c in the Key Distribution Center (KDC) in MIT Kerberos 5 (aka krb5) 1.7 through 1.9, when the PKINIT feature is enabled, allows remote attackers to cause a denial of service (daemon crash) or possibly execute arbitrary code via an e_data field containing typed data.
Family: unix Class: patch
Reference(s): ELSA-2011:0356-01
CVE-2011-0284
Version: 6
Platform(s): Oracle Linux 6
Product(s): krb5
Definition Synopsis:
Definition Id: oval:org.mitre.oval:def:28147
 
Oval ID: oval:org.mitre.oval:def:28147
Title: DEPRECATED: ELSA-2011-0356 -- krb5 security update (important)
Description: [1.8.2-3.6] - add revised upstream patch to fix double-free in KDC while returning typed-data with errors (CVE-2011-0284, #681564) [1.8.2-3.5] - add upstream patches to fix double-free in KDC while returning typed-data with errors (CVE-2011-0284, #681564)
Family: unix Class: patch
Reference(s): ELSA-2011-0356
CVE-2011-0284
Version: 4
Platform(s): Oracle Linux 6
Product(s): krb5
Definition Synopsis:

CPE : Common Platform Enumeration

TypeDescriptionCount
Application 7

OpenVAS Exploits

Date Description
2012-06-15 Name : Fedora Update for krb5 FEDORA-2012-8805
File : nvt/gb_fedora_2012_8805_krb5_fc15.nasl
2012-06-06 Name : RedHat Update for krb5 RHSA-2011:0356-01
File : nvt/gb_RHSA-2011_0356-01_krb5.nasl
2012-02-12 Name : Gentoo Security Advisory GLSA 201201-13 (mit-krb5)
File : nvt/glsa_201201_13.nasl
2012-02-01 Name : Fedora Update for krb5 FEDORA-2011-16284
File : nvt/gb_fedora_2011_16284_krb5_fc15.nasl
2011-11-18 Name : Fedora Update for krb5 FEDORA-2011-14650
File : nvt/gb_fedora_2011_14650_krb5_fc14.nasl
2011-11-18 Name : Fedora Update for krb5 FEDORA-2011-14673
File : nvt/gb_fedora_2011_14673_krb5_fc15.nasl
2011-05-12 Name : FreeBSD Ports: krb5
File : nvt/freebsd_krb511.nasl
2011-05-05 Name : Fedora Update for krb5 FEDORA-2011-5343
File : nvt/gb_fedora_2011_5343_krb5_fc13.nasl
2011-05-05 Name : Fedora Update for krb5 FEDORA-2011-5345
File : nvt/gb_fedora_2011_5345_krb5_fc14.nasl
2011-03-25 Name : Fedora Update for krb5 FEDORA-2011-3462
File : nvt/gb_fedora_2011_3462_krb5_fc14.nasl
2011-03-25 Name : Fedora Update for krb5 FEDORA-2011-3464
File : nvt/gb_fedora_2011_3464_krb5_fc13.nasl
2011-03-24 Name : Ubuntu Update for krb5 vulnerability USN-1088-1
File : nvt/gb_ubuntu_USN_1088_1.nasl

Open Source Vulnerability Database (OSVDB)

Id Description
71183 Kerberos KDC src/kdc/do_as_req.c prepare_error_as() Function AS-REQ Request D...

Kerberos contains a flaw related to the Key Distribution Center daemon within the 'prepare_error_as()' function in 'src/kdc/do_as_req.c' failing to properly handle AS-REQ requests. This may allow a remote attacker to use crafted AS-REQ requests to cause a double-free condition, which may allow the attacker to execute arbitrary code.

Nessus® Vulnerability Scanner

Date Description
2015-01-19 Name : The remote Solaris system is missing a security patch for third-party software.
File : solaris11_kerberos_20130924_2.nasl - Type : ACT_GATHER_INFO
2014-06-13 Name : The remote openSUSE host is missing a security update.
File : suse_11_3_krb5-110316.nasl - Type : ACT_GATHER_INFO
2014-06-13 Name : The remote openSUSE host is missing a security update.
File : suse_11_4_krb5-110316.nasl - Type : ACT_GATHER_INFO
2013-07-12 Name : The remote Oracle Linux host is missing one or more security updates.
File : oraclelinux_ELSA-2011-0356.nasl - Type : ACT_GATHER_INFO
2012-01-24 Name : The remote Gentoo host is missing one or more security-related patches.
File : gentoo_GLSA-201201-13.nasl - Type : ACT_GATHER_INFO
2011-05-05 Name : The remote openSUSE host is missing a security update.
File : suse_11_2_krb5-110316.nasl - Type : ACT_GATHER_INFO
2011-04-15 Name : The remote FreeBSD host is missing one or more security-related updates.
File : freebsd_pkg_7edac52a66cd11e093985d45f3aa24f0.nasl - Type : ACT_GATHER_INFO
2011-03-25 Name : The remote Fedora host is missing a security update.
File : fedora_2011-3462.nasl - Type : ACT_GATHER_INFO
2011-03-25 Name : The remote Fedora host is missing a security update.
File : fedora_2011-3464.nasl - Type : ACT_GATHER_INFO
2011-03-22 Name : The remote Fedora host is missing a security update.
File : fedora_2011-3547.nasl - Type : ACT_GATHER_INFO
2011-03-21 Name : The remote Mandriva Linux host is missing one or more security updates.
File : mandriva_MDVSA-2011-048.nasl - Type : ACT_GATHER_INFO
2011-03-17 Name : The remote Red Hat host is missing one or more security updates.
File : redhat-RHSA-2011-0356.nasl - Type : ACT_GATHER_INFO
2011-03-16 Name : The remote Ubuntu host is missing one or more security-related patches.
File : ubuntu_USN-1088-1.nasl - Type : ACT_GATHER_INFO