{"vuid":"VU#369347","idnumber":"369347","name":"OpenSSH vulnerabilities in challenge response handling","keywords":["SSH","OpenSSH","challenge response","skey","bsd_auth","interactive keyboard authentication","PAMAuthenticationViaKbdInt","privsep","privilege separation"],"overview":"There 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.","clean_desc":"Two 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.","impact":"A 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.","resolution":"Upgrade to OpenSSH version 3.4 These 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 vendor A 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\nprovide additional information.","workarounds":"Disable SSH protocol version 2 Since 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 authentication For 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 keyboard For 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 OpenSSH For 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\nChallengeResponseAuthentication 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 impact System 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.","sysaffected":"","thanks":"The CERT/CC thanks Theo de Raadt and Markus Friedl of the OpenSSH project for their technical assistance in producing this document. The SKEY/BSD_AUTH vulnerability was discovered by Mark Dowd at ISS X-Force.","author":"This document was written by Cory F Cohen.","public":["http://www.openssh.com/txt/preauth.adv","http://bvlive01.iss.net/issEn/delivery/xforce/alertdetail.jsp?oid=20584","http://www.iss.net/security_center/static/9169.php","http://marc.theaimsgroup.com/?l=openssh-unix-dev&m=102495293705094&w=2","http://www.citi.umich.edu/u/provos/ssh/privsep.html","http://www.openbsd.org/cgi-bin/man.cgi?query=login.conf&sektion=5&arch=&apropos=0&manpath=OpenBSD+Current","http://www.securityfocus.com/bid/5093"],"cveids":["CVE-2002-0639"],"certadvisory":"CA-2002-18","uscerttechnicalalert":null,"datecreated":"2002-06-24T19:43:04Z","publicdate":"2002-06-24T00:00:00Z","datefirstpublished":"2002-06-26T22:42:25Z","dateupdated":"2002-12-06T19:25:56Z","revision":38,"vrda_d1_directreport":"","vrda_d1_population":"","vrda_d1_impact":"","cam_widelyknown":"18","cam_exploitation":"10","cam_internetinfrastructure":"15","cam_population":"17","cam_impact":"20","cam_easeofexploitation":"10","cam_attackeraccessrequired":"18","cam_scorecurrent":"49.3425","cam_scorecurrentwidelyknown":"51.6375","cam_scorecurrentwidelyknownexploited":"63.1125","ipprotocol":"","cvss_accessvector":"","cvss_accesscomplexity":"","cvss_authentication":null,"cvss_confidentialityimpact":"","cvss_integrityimpact":"","cvss_availabilityimpact":"","cvss_exploitablity":null,"cvss_remediationlevel":"","cvss_reportconfidence":"","cvss_collateraldamagepotential":"","cvss_targetdistribution":"","cvss_securityrequirementscr":"","cvss_securityrequirementsir":"","cvss_securityrequirementsar":"","cvss_basescore":"","cvss_basevector":"","cvss_temporalscore":"","cvss_environmentalscore":"","cvss_environmentalvector":"","metric":49.3425,"vulnote":null}