telnet client and server encrypt_keyid heap-based buffer overflow
CVE: CVE-2011-4862
Component: krb5
CWE: CWE-119
Severity: Critical
Release date: 2011-12-25T00:00:00+00:00

Buffer overflow in libtelnet/encrypt.c in telnetd in FreeBSD 7.3 through 9.0, MIT Kerberos Version 5 Applications (aka krb5-appl) 1.0.2 and earlier, Heimdal 1.5.1 and earlier, GNU inetutils, and possibly other products allows remote attackers to execute arbitrary code via a long encryption key, as exploited in the wild in December 2011.

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.

Remediation:
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 these commands will display "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

Before applying this update, make sure all previously-released errata
relevant to your system have been applied.

This update is available via the Red Hat Network. Details on how to
use the Red Hat Network to apply this update are available at
https://access.redhat.com/kb/docs/DOC-11259
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 these commands will display "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

Before applying this update, make sure all previously-released errata
relevant to your system have been applied.

This update is available via the Red Hat Network. Details on how to
use the Red Hat Network to apply this update are available at
https://access.redhat.com/kb/docs/DOC-11259
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 these commands will display "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

Before applying this update, make sure all previously-released errata
relevant to your system have been applied.

This update is available via the Red Hat Network. Details on how to
use the Red Hat Network to apply this update are available at
https://access.redhat.com/kb/docs/DOC-11259
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 these command will display "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

Before applying this update, make sure all previously-released errata
relevant to your system have been applied.

This update is available via the Red Hat Network. Details on how to
use the Red Hat Network to apply this update are available at
https://access.redhat.com/kb/docs/DOC-11259