Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 312481 - <app-crypt/mit-krb5-1.7.2 SPNEGO GSS-API DoS (CVE-2010-0628)
Summary: <app-crypt/mit-krb5-1.7.2 SPNEGO GSS-API DoS (CVE-2010-0628)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Security
URL: https://bugzilla.redhat.com/show_bug....
Whiteboard: B3 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-31 19:34 UTC by Alex Legler (RETIRED)
Modified: 2011-01-03 20:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mit-krb5-1.8.1.ebuild (mit-krb5-1.8.1.ebuild,3.36 KB, text/plain)
2010-04-09 10:15 UTC, Eray Aslan
no flags Details
mit-krb5-1.8.1 with CVE-2010-1320 patch (mit-krb5-1.8.1-r1.ebuild,3.38 KB, text/plain)
2010-04-21 06:28 UTC, Eray Aslan
no flags Details
CVE-2010-1320 patch (CVE-2010-1320.patch,721 bytes, patch)
2010-04-21 06:29 UTC, Eray Aslan
no flags Details | Diff
mit-krb5-1.8.1 ebuild (mit-krb5-1.8.1.ebuild,2.47 KB, text/plain)
2010-04-29 19:22 UTC, Eray Aslan
no flags Details
Kerberized programs split from mit-krb5 (mit-krb5-appl-1.0.ebuild,1.50 KB, text/plain)
2010-04-29 19:28 UTC, Eray Aslan
no flags Details
mit-krb5-1.8.1.ebuild (mit-krb5-1.8.1.ebuild,2.61 KB, text/plain)
2010-04-30 14:48 UTC, Eray Aslan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Legler (RETIRED) archtester gentoo-dev Security 2010-03-31 19:34:53 UTC
CVE-2010-0628 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2010-0628):
  The spnego_gss_accept_sec_context function in
  lib/gssapi/spnego/spnego_mech.c in the SPNEGO GSS-API functionality
  in MIT Kerberos 5 (aka krb5) 1.7 before 1.7.2 and 1.8 before 1.8.1
  allows remote attackers to cause a denial of service (assertion
  failure and daemon crash) via an invalid packet that triggers
  incorrect preparation of an error token.
Comment 1 Eray Aslan gentoo-dev 2010-04-09 10:15:55 UTC
Created attachment 227095 [details]
mit-krb5-1.8.1.ebuild

mit-krb5-1.8.1 is out.  Attached is the ebuild that works for me.  Couple of points:

* Works with openssl-1.0.0.  Closes bug #310451
* Added ldap USE flag.  Closes bug #177522
* Kerberized versions of telnet, rlogin, rsh, rcp, and ftp clients and daemons
are distributed as a seperate tarball from version 1.8 onwards.  Hence, the new
appl USE flag.  These programs are no longer in wide use (OpenSSH is usually
used instead).  The default is not to install them.

Please bump.  Thank you.
Comment 2 Eray Aslan gentoo-dev 2010-04-21 06:28:54 UTC
Created attachment 228577 [details]
mit-krb5-1.8.1 with CVE-2010-1320 patch

CVE-2010-1320

SUMMARY
=======

A double free vulnerability exists in the KDC in MIT krb5 releases
krb5-1.7 and later.

This is an implementation vulnerability in MIT krb5, and not a
vulnerability in the Kerberos protocol.

IMPACT
======

An authenticated remote attacker can crash the KDC by inducing the KDC
to perform a double free.  Under some circumstances on some platforms,
this could also allow malicious code execution.  Successfully inducing
code execution by exploiting a double free is believed to be
difficult, and no such exploits are known to exist for this
vulnerability.

AFFECTED SOFTWARE
=================

* KDC in krb5-1.7 and later

FIXES
=====

* The upcoming krb5-1.8.2 release, as well as an upcoming krb5-1.7
  series release, will contain a fix.

* Apply the following patch:
[...]

Ebuild and patch are attached.
Comment 3 Eray Aslan gentoo-dev 2010-04-21 06:29:32 UTC
Created attachment 228579 [details, diff]
CVE-2010-1320 patch
Comment 4 Eray Aslan gentoo-dev 2010-04-29 19:22:41 UTC
Created attachment 229727 [details]
mit-krb5-1.8.1 ebuild

Well, looks like splitting the package is the better option.  To recap: The bundled kerborized apps are not in wide use anymore.  It lets us decouple the release cycles.  Ebuilds become much simpler.   Also, all the distros I checked (including Debian, Fedora, FreeBSD) either have already split or are in the proces of splitting mit-krb5.
Comment 5 Eray Aslan gentoo-dev 2010-04-29 19:28:46 UTC
Created attachment 229729 [details]
Kerberized programs split from mit-krb5

Kerberized versions of telnet, rlogin, rsh, rcp, ftp clients and telnet, ftp daemons
Comment 6 XhE 2010-04-29 23:10:45 UTC
Could you please change the ebuild, so that it installs

1) kdc.conf.example rather to /var/lib/krb5kdc/
2) or add some file /etc/conf.d/mit-krb5kdc with some line like

export KRB5_KDC_PROFILE="/etc/kdc.conf".

I was highly confused, why my changes to the port settings were not respected until I found out about the default location for the KDC configuration.

Thanks a lot; also for the tools splitup. :)

And does somebody know about QA warnings after compile? They were introducted in the 1.7 ebuilds. And I'm not quite sure, if there wasn't a patch to the 1.6.3-r6 ebuild that actually fixed those. If it is not about a missing patch, then I will directly ask the MIT guys about it.

A last thing: is it possible to add a dependency to an ebuild, so that

ebuild something.ebuild manifest

checks for the dependent files? Because I at first didn't copy the init.d scripts to my overlay and was confused, why those files were not created.
Comment 7 Eray Aslan gentoo-dev 2010-04-30 07:08:05 UTC
(In reply to comment #6)
> Could you please change the ebuild, so that it installs
> 1) kdc.conf.example rather to /var/lib/krb5kdc/

Agreed that /var/lib/krb5kdc is the correct place. I keep mine in /var/lib as well.  However, in gentoo previous versions placed kdc.conf.example in /etc and suddenly changing the location is not a good move.  We do not want to surprise users.

I symlink from /etc to /var/lib.  You can also use the environment variable KRB5_KDC_PROFILE to change the location.

> And does somebody know about QA warnings after compile?

Upstream AFAIK.

> A last thing: is it possible to add a dependency to an ebuild, so that
> ebuild something.ebuild manifest checks for the dependent files?

You can do "newinitd ... ... || die ..." I guess but better still read your build logs cerafully first time you change the ebuild.
Comment 8 XhE 2010-04-30 09:53:01 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Could you please change the ebuild, so that it installs
> > 1) kdc.conf.example rather to /var/lib/krb5kdc/
> 
> Agreed that /var/lib/krb5kdc is the correct place. I keep mine in /var/lib as
> well.  However, in gentoo previous versions placed kdc.conf.example in /etc and
> suddenly changing the location is not a good move.  We do not want to surprise
> users.
> 
> I symlink from /etc to /var/lib.  You can also use the environment variable
> KRB5_KDC_PROFILE to change the location.

Okay, I see your point to not surprise the users. So I'd propose that the ebuild either creates a symlink from /etc/kdc.conf to /var/lib/krb5kdc/kdc.conf (if there is no kdc.conf in /var/lib/krb5kdc/) or adds the before mentioned /etc/conf.d/mit-krb5kdc that exports KRB5_KDC_PROFILE. Otherwise it feels a little bit inconsistent, when you emerge it the first time.

And if you still don't like it, what about a short notice at the end of the compile cycle? Something like:

"Please note that mit-krb5 looks for the KDC's configuration in /var/lib/krb5kdc/ by default. You could change this behaviour by exporting KRB5_KDC_PROFILE in /etc/conf.d/mit-krb5kdc."

> > And does somebody know about QA warnings after compile?
> 
> Upstream AFAIK.

that sounds great.

> > A last thing: is it possible to add a dependency to an ebuild, so that
> > ebuild something.ebuild manifest checks for the dependent files?
> 
> You can do "newinitd ... ... || die ..." I guess but better still read your
> build logs cerafully first time you change the ebuild.
> 

I just read my comment again, and realized that I wasn't clear enough. I didn't change the ebuild. I just didn't want to put it directly into the portage tree but an overlay so that I can easily remove it, when it has finally been added to the official tree. But this way emerge won't find the files mit-krb5kdc.initd and mit-krb5kadmind.initd (from /usr/portage/app-crypt/mit-krb5/files). And I was wondering, if it is possible to have

ebuild mit-krb5-1.8.1.ebuild manifest

to fail, if these init.d scripts haven't been copied to the overlay as well.
Comment 9 Eray Aslan gentoo-dev 2010-04-30 14:48:00 UTC
Created attachment 229805 [details]
mit-krb5-1.8.1.ebuild

(In reply to comment #8)
> And if you still don't like it, what about a short notice at the end of the
> compile cycle? Something like:

Symlinking is a gross hack.  Won't do.

Moved example kdc.conf file to /var/lib/krb5kdc.  Thank you for your feedback.
Comment 10 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-04-30 22:16:24 UTC
(In reply to comment #9)
> Created an attachment (id=229805) [details]
> mit-krb5-1.8.1.ebuild

Thanks. Committed for you, I added a src_prepare() step since that is the proper place to do patching.

In the future, configure your editor for UNIX line endings. I had to run dos2unix on all of your files.
Comment 11 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-04-30 22:19:36 UTC
(In reply to comment #5)
> Created an attachment (id=229729) [details]
> Kerberized programs split from mit-krb5
> 
> Kerberized versions of telnet, rlogin, rsh, rcp, ftp clients and telnet, ftp
> daemons
> 

Committed. Thanks.
Comment 12 XhE 2010-05-02 21:03:27 UTC
Just tested the committed ebuild. Works perfectly.
Thanks to both of you.
Comment 13 Tim Sammut (RETIRED) gentoo-dev 2010-11-26 22:56:26 UTC
Newer versions of app-crypt/mit-krb5 are now stable.

GLSA vote: no.
Comment 14 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2011-01-03 20:42:44 UTC
Old and DoS only so GLSA Vote: no -> Closing. Feel free to reopen if you disagree.