Bug 770325 - (CVE-2011-4862) CVE-2011-4862 krb5: telnet client and server encrypt_keyid heap-based buffer overflow
CVE-2011-4862 krb5: telnet client and server encrypt_keyid heap-based buffer ...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
urgent Severity urgent
: ---
: ---
Assigned To: Red Hat Product Security
impact=critical,public=20111225,repor...
: Security
Depends On: 770348 770349 770350 770351 770352 770518 770519 770527 770528 770529 770794 844271
Blocks: 770326
  Show dependency treegraph
 
Reported: 2011-12-25 21:45 EST by Huzaifa S. Sidhpurwala
Modified: 2015-11-24 09:44 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-22 11:54:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
FreeBSD patch from FreeBSD-SA-11:08.telnetd (851 bytes, patch)
2011-12-25 22:21 EST, Huzaifa S. Sidhpurwala
no flags Details | Diff
Patch backport to rhel-6/fedora (484 bytes, patch)
2011-12-26 01:27 EST, Huzaifa S. Sidhpurwala
no flags Details | Diff
rhel-4/rhel-5 straight backport (479 bytes, patch)
2011-12-26 02:03 EST, Huzaifa S. Sidhpurwala
no flags Details | Diff

  None (edit)
Description Huzaifa S. Sidhpurwala 2011-12-25 21:45:58 EST
Florian Weimer reports:

A pre-authentication buffer overflow in telnetd recently fixed by FreeBSD is not BSD-specific.  It seems to have been added at MIT when the BSD telnetd was Kerberized, and it ended up in the Heimdal recryptofication of Kerberos (from where FreeBSD got it) and later in GNU inetutils.

Reference:
http://seclists.org/oss-sec/2011/q4/556
http://security.freebsd.org/advisories/FreeBSD-SA-11:08.telnetd.asc
http://web.mit.edu/kerberos/advisories/MITKRB5-SA-2011-008.txt
http://www.debian.org/security/2011/dsa-2375
http://thexploit.com/secdev/a-textbook-buffer-overflow-a-look-at-the-freebsd-telnetd-code/

Note:
Since same encryption code is shared between the MIT krb5 telnet daemon and the
telnet client, this issue affects the telnet client as well.
Comment 1 Huzaifa S. Sidhpurwala 2011-12-25 22:21:52 EST
Created attachment 549530 [details]
FreeBSD patch from FreeBSD-SA-11:08.telnetd

Source: http://security.freebsd.org/patches/SA-11:08/telnetd.patch
Comment 4 Huzaifa S. Sidhpurwala 2011-12-26 01:27:49 EST
Created attachment 549549 [details]
Patch backport to rhel-6/fedora
Comment 5 Huzaifa S. Sidhpurwala 2011-12-26 02:03:34 EST
Created attachment 549550 [details]
rhel-4/rhel-5 straight backport
Comment 8 Huzaifa S. Sidhpurwala 2011-12-26 04:47:32 EST
This issue affects the version of krb5-appl shipped with Red Hat Enterprise Linux 4, 5 and 6.

This issue affects the version of krb5-appl shipped with Fedora release 15 and 16.

Red Hat Enterprise Linux also ships netkit-telnet, this package is not affected by this issue.
Comment 12 Mark J. Cox (Product Security) 2011-12-27 03:21:19 EST
Note that the krb5 telnet daemon is not enabled by default in any version of Red Hat Enterprise Linux. In addition, the default firewall rules block remote access to the telnet port. This flaw does not affect the telnet daemon distributed in the telnet-server package. 

The krb5 telnet daemon is an xinetd service. You can determine if krb5 telnetd is enabled with the commands: 

/sbin/chkconfig --list krb5-telnet 
/sbin/chkconfig --list ekrb5-telnet 

The output of this command will be "krb5-telnet on" or "ekrb5-telnet on" if krb5 telnet is enabled. krb5 telnet daemon can be immediately disabled with the commands: 

/sbin/chkconfig krb5-telnet off
/sbin/chkconfig ekrb5-telnet off

While we are aware of public exploits for this issue, we are not aware of any yet which would be successful in gaining arbitrary root code execution in Red Hat Enterprise Linux.  However it is plausible that one could be created to do so.  For users who have enabled the krb5 telnet daemon and have it accessible remotely, they should disable it until we provide updated packages to correct this flaw.
Comment 15 Mark J. Cox (Product Security) 2011-12-27 04:41:02 EST
Statement:

A buffer overflow flaw was found in the MIT krb5 telnet daemon (telnetd) as shipped with all supported versions of Red Hat Enterprise Linux. A remote attacker who can access the telnet port of a target machine could use this flaw to execute arbitrary code as root.

While we are aware of public exploits for this issue that include targets for Red Hat Enterprise Linux 3, we are not aware of any yet which would be successful in gaining arbitrary root code execution in Red Hat Enterprise Linux 4, 5, or 6.  However it is plausible that one could be created to do so.

Note that the krb5 telnet daemon is not enabled by default in any version of Red Hat Enterprise Linux. In addition, the default firewall rules block remote access to the telnet port. This flaw does not affect the telnet daemon distributed in the telnet-server package.

For users who have enabled the krb5 telnet daemon and have it accessible remotely, they should disable it or apply the updates we have released.

Since same encryption code is shared between the MIT krb5 telnet daemon and the telnet client, this issue affects the telnet client as well. The updates we have released fixes the issue for both, the telnet daemon and the telnet client.
Comment 16 errata-xmlrpc 2011-12-27 11:16:38 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5
  Red Hat Enterprise Linux 4

Via RHSA-2011:1851 https://rhn.redhat.com/errata/RHSA-2011-1851.html
Comment 17 errata-xmlrpc 2011-12-27 11:27:38 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2011:1852 https://rhn.redhat.com/errata/RHSA-2011-1852.html
Comment 23 errata-xmlrpc 2011-12-28 14:11:33 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6.0.Z - Server Only
  Red Hat Enterprise Linux 6.1.Z - Server Only

Via RHSA-2011:1854 https://rhn.redhat.com/errata/RHSA-2011-1854.html
Comment 24 errata-xmlrpc 2011-12-28 14:11:41 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 3 Extended Lifecycle Support
  Red Hat Enterprise Linux 5.3 Long Life
  Red Hat Enterprise Linux 5.6.Z - Server Only

Via RHSA-2011:1853 https://rhn.redhat.com/errata/RHSA-2011-1853.html
Comment 34 Fedora Update System 2012-01-05 15:57:20 EST
krb5-appl-1.0.1-8.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 35 Fedora Update System 2012-01-05 16:02:56 EST
krb5-appl-1.0.2-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.