|
![]() ![]() |
CERT® Advisory CA-2002-18 OpenSSH Vulnerabilities in Challenge Response HandlingOriginal release date: June 26, 2002Last revised: December 6, 2002 Source: CERT/CC A complete revision history can be found at the end of this file. Systems Affected
OverviewThere are two related vulnerabilities in the challenge response handling code in OpenSSH versions 2.3.1p1 through 3.3. They may allow a remote intruder to execute arbitrary code as the user running sshd (often root). The first vulnerability affects OpenSSH versions 2.9.9 through 3.3 that have the challenge response option enabled and that use SKEY or BSD_AUTH authentication. The second vulnerability affects PAM modules using interactive keyboard authentication in OpenSSH versions 2.3.1p1 through 3.3, regardless of the challenge response option setting. Additionally, a number of other possible security problems have been corrected in OpenSSH version 3.4. I. DescriptionTwo related vulnerabilities have been found in the handling of challenge responses in OpenSSH. The first vulnerability is an integer overflow in the handling of the number of responses received during challenge response authentication. If the challenge response configuration option is set to yes and the system is using SKEY or BSD_AUTH authentication then a remote intruder may be able to exploit the vulnerability to execute arbitrary code. This vulnerability is present in versions of OpenSSH 2.9.9 through 3.3. An exploit for this vulnerability is reported to exist. This vulnerability is partially described in a recent ISS security advisory available at http://bvlive01.iss.net/issEn/delivery/xforce/alertdetail.jsp?oid=20584 The second vulnerability is a buffer overflow involving the number of responses received during challenge response authentication. Regardless of the setting of the challenge response configuration option, systems using PAM modules that use interactive keyboard authentication (PAMAuthenticationViaKbdInt), may be vulnerable to the remote execution of code. At this time, it is not known if this vulnerability is exploitable. Both vulnerabilities are corrected by the patches in a recent OpenSSH security advisory available from http://www.openssh.com/txt/preauth.adv Both vulnerabilities exploit features present only in version 2 of the SSH protocol. Vulnerability Note VU#369347 lists the vendors we contacted about this vulnerability. The vulnerability note is available from http://www.kb.cert.org/vuls/id/369347 II. ImpactA remote attacker can execute code with the privileges of the user running the sshd (often root). These vulnerabilities may also be used to cause a denial-of-service condition. III. SolutionUpgrade to OpenSSH version 3.4These vulnerabilities are eliminated by upgrading to OpenSSH version 3.4, which is available from the OpenSSH web site at http://www.openssh.com OpenSSH version 3.4 will correct several other software defects with potential security implications not described in this advisory. Apply a patch from your vendorA patch for this problem is included in the OpenSSH advisory at http://www.openssh.com/txt/preauth.adv This patch may be manually installed with minor changes to correct these vulnerabilities in all affected versions of OpenSSH. Please note that applying the patches described in the OpenSSH advisory does not correct the other software defects with potential security implications not described in this advisory. If your vendor has provided a patch to correct these vulnerabilities, you may want to apply their patch rather than upgrading your version of sshd. System administrators may want to confirm whether their vendor's patch includes the other possible vulnerabilities corrected in OpenSSH 3.4. More information about vendor-specific patches can be found in the vendor section of this document. Because the publication of this advisory was unexpectedly accelerated, statements from all of the affected vendors were not available at publication time. We will update this document as vendors provide additional information. Disable SSH protocol version 2Since both vulnerabilities are present only in protocol version 2 features, disabling version 2 of the protocol will prevent both vulnerabilities from being exploited. Typically, this is accomplished by adding the following line to /etc/ssh/sshd_config: Protocol 1 This option may set to "2,1" by default. System administrators should be aware that disabling protocol version 2 may prevent the sshd daemon from accepting connections in certain configurations. Applying one or both of the configuration changes described below may be a less disruptive workaround for this problem. Disable challenge response authenticationFor OpenSSH versions greater than 2.9, system administrators can disable the vulnerable portion of the code by setting the "ChallengeResponseAuthentication" configuration option to "no" in their sshd configuration file. Typically, this is accomplished by adding the following line to /etc/ssh/sshd_config: ChallengeResponseAuthentication no This option may be enabled (set to "yes") by default. This workaround should prevent the first vulnerability from being exploited if SKEY or BSD_AUTH authentication is used. It will not prevent the possible exploitation of the vulnerability via PAM interactive keyboard authentication. Disable PAM authentication via interactive keyboardFor OpenSSH versions greater than 2.9, system administrators can disable the vulnerable portion of the code affecting the PAM authentication issue by setting the "PAMAuthenticationViaKbdInt" configuration option to "no" in their sshd configuration file. Typically, this is accomplished by adding the following line to /etc/ssh/sshd_config: PAMAuthenticationViaKbdInt no This option may be disabled (set to "no") by default. This workaround should prevent the second vulnerability from being exploited if PAM interactive keyboard authentication is used. It will not prevent the possible exploitation of the vulnerability via SKEY or BSD_AUTH authentication. Disable both options in older versions of OpenSSHFor OpenSSH versions between 2.3.1p1 and 2.9, system adminstrators will instead need to set the following options in their ssh configuration file: KbdInteractiveAuthentication no Setting both of these options is believed to prevent the exploitation of the vulnerabilities regardless of which authentication mechanisms are used. Use privilege separation to minimize impactSystem administrators running OpenSSH versions 3.2 or 3.3 may be able to reduce the impact of this vulnerability by enabling the "UsePrivilegeSeparation" configuration option in their sshd configuration file. Typically, this is accomplished by adding the following line to /etc/ssh/sshd_config: UsePrivilegeSeparation yes This workaround does not prevent these vulnerabilities from being exploited, however due to the privilege separation mechanism, the intruder may be limited to a constrained chroot environment with restricted privileges. This workaround will not prevent these vulnerabilities from creating a denial-of-service condition. Not all operating system vendors have implemented the privilege separation code, and on some operating systems, it may limit the functionality of OpenSSH. System administrators are encouraged to carefully review the implications of using the workaround in their environment, and use a more comprehensive solution if one is available. The use of privilege separation to limit the impact of future vulnerabilities is encouraged. Appendix A. - Vendor InformationThis appendix contains information provided by vendors for this advisory. As vendors report new information to the CERT/CC, we will update this section and note the changes in our revision history. If a particular vendor is not listed below, we have not received their comments. AlcatelIn relation to this CERT advisory on security vulnerabilities with OpenSSH implementation, Alcatel has conducted an immediate assessment to determine any impact this may have on our portfolio. An initial analysis has shown that none of our products is affected when used as delivered to customers. The security of our customers' networks is of highest priority for Alcatel. Therefore, updates will be provided if necessary. Customers may contact their Alcatel support representative for more details. Apple Computer Inc.These vulnerabilities are fixed with the release of the "Security Update - July 2002" software update. Compaq Computer CorporationCompaq has released Security Bulletin SSRT2263 (document number SRB0022W). CalderaCaldera OpenLinux OpenSSH has neither the S/KEY nor BSD Auth features compiled in, so it is not vulnerable to the Challenge/Response vulnerability. We do have the ChallengeResponseAuthentication option on by default, however, so to be safe, we recommend that the option be disabled in the sshd_config file. In addition, the sshd_config PAMAuthenticationViaKbdInt option is off by default, so OpenLinux is not vulnerable to the other alleged vulnerability in a default configuration, either. However, Caldera recommends that this option be disabled if it has been enabled by the system administrator. CiscoCisco Systems is evaluating the vulnerabilities identified by VU#369347. Should an issue be found, Cisco will release a Security Advisory. The most up-to-date information on all Cisco product security issues may be found at http://www.cisco.com/go/psirt/ Cray, Inc.Cray, Inc. has found the OpenSSH released in Cray Open Software 3.0 to be vulnerable. Please see Field Notice 5105 and spr 722588 for fix information. DebianDebian 2.2 (the current stable release) is not affected by these problems. The current versions of our "testing" distribution, to become Debian 3.0, and our "unstable" distribution, are both affected by default. We recommend that users be certain that both: ChallengeResponseAuthentication noand PAMAuthenticationViaKbdInt noare present and uncommented in /etc/ssh/sshd_config (and that the server is restarted). Also, we recommend the use of version 3.3p1, now available from security.debian.org (DSA-134). Stable users do not need to upgrade and may wish to wait until the packages have received better testing. We intend to provide 3.4p1 packages in the near future. EngardeGuardian Digital ships OpenSSH in all versions of EnGarde Secure Linux. Version 3.3p1 was introduced by ESA-20020625-015 on June 25, 2002. This update introduces privilege separation. All users are strongly urged to upgrade to this version as soon as possible. An upgrade to version 3.4p1 (which properly fixes the bugs) will be made available sometime in the next few days. F5 NetworksThe following versions of F5 Networks, Inc. products contain a vulnerable version of the OpenSSH server. Instructions for obtaining and installing a patch are available at the following locations: BIG-IP ® and 3-DNS® versions 4.2 through 4.3GLOBAL-SITE® versions 2.2 through 3.0 EDGE-FX® versions 2.0 through 3.0 Software versions not listed above are not affected by this vulnerability. FreeBSDPlease note that no released versions of FreeBSD-STABLE are vulnerable to either issue described in this advisory. See FreeBSD-SA-02:31 for more information. F-SecureF-Secure SSH product versions are not affected by these vulnerabilities discussed in CERT Advisory CA-2002-18. FujitsuFujitsu's UXP/V operating system is not affected because it does not support any SSH package. Hewlett-Packard CompanyHP has issued a security bulletin (HPSBUX0206-195) for HP 9000 Servers running HP-UX release 11.00 and 11.11 only with the T1471AA SSH product installed. It says in part: As a short-term solution, disable PAMAuthenticationViaKbdInt in the sshd_config file; i.e., HP has issued Security Bulletin HPSBTL0207-050 for OpenSSH 3.1p1 running on HP Secure OS Software for Linux. IBM CorporationIBM's AIX operating system does not ship with OpenSSH; however, OpenSSH is available for installation on AIX via the Linux Affinity Toolkit. The version included on the CD containing the Toolkit is vulnerable to the latest discovered vulnerability discussed here as is the version of OpenSSH available for downloading from the IBM Linux Affinity website. Anyone running this version is advised to follow the recommendations above to limit their vulnerability. We working with the changes for version 3.4 and will have a new package availble for download as soon as possible. When available the new packages can be downloaded from: http://www6.software.ibm.com/dl/aixtbx/aixtbx-p This site contains Linux Affinity applications containing cryptographic algorithms, and new users of this site are asked to register first. The IBM HMC product is also affected by the SSH vulnerability described above. The HMC is the hardware monitor and control console used with IBM's Regatta systems. This is a seperate hardware unit that uses a Linux-based operating system and Open Source software. Customers are advised to obtain the latest security paches for the HMC. These paches will be available early next week from the following URL: http://techsupport.services.ibm.com/server/hmc?fetch=corrsrv.html Customers are advised to limit the use of SSH until these patches have been applied. Juniper NetworksAlthough all domestically (i.e., United States) available releases of JUNOS Internet Software includes OpenSSH, the version of OpenSSH used is not susceptible to this vulnera- bility. There is therefore no need for customers to upgrade their JUNOS software. OpenSSH is not included in any world-wide version of JUNOS, nor is it included in the Prisma G10 CMTS software release. Therefore, neither of these products are not susceptible to this vulnerability. LotusLotus products are not vulnerable to this problem. Mandrake SoftwareMandrakeSoft released OpenSSH 3.3p1 in updates Monday night to mitigate this vulnerability. Updates to OpenSSH 3.4p1 will be available for download later this week. Microsoft CorporationMicrosoft products are not affected by the issues detailed in this advisory. NetBSDThe signed advisory is available at: ftp://ftp.NetBSD.ORG/pub/NetBSD/security/advisories/NetBSD-SA2002-005.txt.asc NetscreenNetScreen appliances and systems are not vulnerable to either issue mentioned in the referenced advisory. NetScreen products do not implement the challenge-response authentication methods described in the advisory. Network ApplianceNetApp systems are not vulnerable to this problem. Nortel NetworksNortel Networks has concluded its portfolio review and has determined that the following two products are shipped with OpenSSH:
For more information please contact Nortel at: North America: 1-8004NORTEL or 1-800-466-7835Contacts for other regions are available at www.nortelnetworks.com/help/contact/global/ OpenBSDSee http://www.openbsd.org/errata.html#sshd OpenPKGThe OpenPKG Project has released OpenPKG Security Advisory OpenPKG-SA-2002.005. OpenSSHSee http://www.openssh.com/txt/preauth.adv Process SoftwareMultiNet, TCPware, and SSH for OpenVMS are not affected by the problems outlined in this advisory. RedHat Inc.Red Hat Linux versions 7, 7.1, 7.2 and 7.3 as well as Red Hat Linux Advanced Server version 2.1 ship with OpenSSH. The Red Hat Linux OpenSSH packages were not compiled with either BSD_AUTH or SKEY enabled, therefore in order to be vulnerable to this issue a user would need to have enabled the configuration option "PAMAuthenticationViaKbdInt" in their sshd configuration file (the default is disabled). We are continuing to investigate this vulnerability and will release updated packages where appropriate. SGIAt this time, SGI does not ship OpenSSH as a part of IRIX. The OpenSSH privilege separation code mostly works with IRIX, but it uses a flag to mmap that isn't in IRIX (MAP_ANON) for compression so you can't have both on at the same time. IRIX doesn't ship with PAM so a lot of the PAM issues aren't issues for us. SlackwareSlackware has upgraded to OpenSSH-3.4-p1. See the entry dated "Wed Jun 26 12:03:06 PDT 2002" in the slackware-8.1, slackware-8.0, and slackware-7.1 ChangeLogs. SSH Communications SecuritySSH Communications Security Oyj. SSH Secure Shell product versions are not affected by these vulnerabilities. Sun MicrosystemsThe version of OpenSSH that is in Solaris 9 is not believed to be vulnerable if the default configuration is used. If sshd_config(4) has been updated so that BOTH of the following entries are present then it is vulnerable. PAMAuthenticationViaKBDInt yes Note that in the default sshd_config(4) PAMAuthenticationViaKBDInt is listed but KbdInteractiveAuthentication is not (the compiled in default for KbdInteractiveAuthentication is no). Sun is in the process of producing a patch for Solaris 9. Older Solaris releases are not vulnerable since they do not include OpenSSH as part of the Solaris distribution - hosts that added OpenSSH as part of their own site configurations should check the official OpenSSH advisory for details. The patch that Sun produces to fix this issue will not contain the new OpenSSH Privsep support as it is not yet stable enough on Solaris due to interactions with PAM and BSM auditing, this may appear in a future release - Sun is working with the OpenSSH developers on the PAM problems and once a working OpenSSH with PAM and BSM is available we will re-evaluate our position on Privsep. Sun will publish a Sun Security Bulletin and a Sun Alert for this issue. The Sun Alert will be available from: http://sunsolve.sun.com The patch will be available from: http://sunsolve.sun.com/securitypatch Sun Security Bulletins are available from: http://sunsolve.sun.com/security SuSE Linux[F]urther details about the bugs in question have turned up by now, indicating that SuSE Linux products are not affected to the mentioned problem unless the administrator of an openssh installation has actively added the configuration option (PAMAuthenticationViaKbdInt) to the daemon configuration file /etc/ssh/sshd_config to turn this option on. In other words: We are not vulnerable by default. We have quickly published update packages with the workaround as described in your announcement, but due to incompatibilities and errors in the newer package, we think about downgrading back to our 2.9.9p2 version packages as well as one newer version on one of our newer products. The decision about the downgrade has not been made yet, but we are positive about that we will publish another set of update packages that effectively remove the weakness from the package. After all, the currently offered packages for download from our ftp server (ftp://ftp.suse.com/pub/suse/i386/update/) represent an emergency fix that should be considered incomplete considering the quality standards at SuSE. Trustix Secure LinuxTrustix has released Trustix Secure Linux Security Advisory #2002-0059. Unisphere NetworksThe SSH implementation used within the Unison OS found on the ERX and MRX product lines is based on a third-party product that has been confirmed to be invulnerable to the OpenSSH vulnerabilities outlined in CERT Advisory CA-2002-18. XeroxA response to this advisory is available from our web site: http://www.xerox.com/security. The CERT/CC thanks Theo de Raadt and Markus Friedl of the OpenSSH project for their technical assistance in producing this advisory. Author: Cory F. Cohen This document is available from: http://www.cert.org/advisories/CA-2002-18.html CERT/CC Contact Information
Phone: +1 412-268-7090 (24-hour hotline) Fax: +1 412-268-6989 Postal address: CERT/CC personnel answer the hotline 08:00-17:00 EST(GMT-5) / EDT(GMT-4) Monday through Friday; they are on call for emergencies during other hours, on U.S. holidays, and on weekends. Using encryptionWe strongly urge you to encrypt sensitive information sent by email. Our public PGP key is available from If you prefer to use DES, please call the CERT hotline for more information. Getting security informationCERT publications and other security information are available from our web site
* "CERT" and "CERT Coordination Center" are registered in the U.S. Patent and Trademark Office.
NO WARRANTY Conditions for use, disclaimers, and sponsorship information
Copyright 2002 Carnegie Mellon University. Revision History June 26, 2002: Initial release June 26, 2002: Added statement from SuSE which should have been in the original advisory June 27, 2002: Added Fujitsu vendor statement. June 27, 2002: Added F-Secure vendor statement. June 27, 2002: Added SSH Communications Security vendor statement. June 27, 2002: Added Netscreen vendor statement. June 27, 2002: Updated Hewlett Packard vendor statement. June 27, 2002: Added Nortel vendor statement. July 02, 2002: Added Juniper Networks vendor statement. July 02, 2002: Added Unisphere vendor statement. July 02, 2002: Added Sun Microsystems vendor statement. July 02, 2002: Added FreeBSD vendor statement. July 02, 2002: Added Apple Computer Inc statement. July 08, 2002: Added NetBSD vendor statement. July 08, 2002: Added Cisco vendor statement. July 16, 2002: Updated FreeBSD vendor statement. July 16, 2002: Updated Hewlett Packard vendor statement. July 16, 2002: Updated Nortel Networks vendor statement. July 16, 2002: Updated Compaq vendor statement. July 17, 2002: Added F5 Networks vendor statement. July 17, 2002: Added Slackware vendor statement. July 17, 2002: Added Trustix vendor statement. July 17, 2002: Added OpenPKG vendor statement. August 8, 2002: Added Alcatel vendor statement. August 8, 2002: Updated IBM vendor statament. December 6, 2002: Added Xerox vendor statement. |








