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.
Created attachment 549530 [details] FreeBSD patch from FreeBSD-SA-11:08.telnetd Source: http://security.freebsd.org/patches/SA-11:08/telnetd.patch
Created attachment 549549 [details] Patch backport to rhel-6/fedora
Created attachment 549550 [details] rhel-4/rhel-5 straight backport
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.
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.
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.
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
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
Fedora updates: Fedora-15: https://admin.fedoraproject.org/updates/FEDORA-2011-17492/krb5-appl-1.0.1-8.fc15 Fedora-16: https://admin.fedoraproject.org/updates/FEDORA-2011-17493/krb5-appl-1.0.2-2.fc16
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
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
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.
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.