Picon
Favicon

FW: CVE-2008-1668 - ftpd 2.4 - unauthorized root access - patch details

 Re-send. oss-security@... truncated for some reason.

-----Original Message-----
From: Morris, John R. (SSRT)
Sent: Wednesday, August 20, 2008 2:05 PM
To: oss-
Cc: Steven M. Christey
Subject: CVE-2008-1668 - ftpd 2.4 - unauthorized root access - patch details

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This security vulnerability was reported in the HP Security Bulletin,
HPSBUX02356 SSRT080051 rev.1 - HP-UX Running ftpd, Remote Privileged Access.
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID
=c01525562  We believe the vulnerability exists in the latest wu-ftpd
2.4 code.

Code diff
==========

111,113d110
< /* CVE-2008-1668: Introduced to track  errno set by getpwnam() */ < int getpwnam_err=0; <
1299,1301d1295
<
< /* CVE-2008-1668 : Setting ernno to zero to get the errno details of getpwnam() */ < errno = 0;
1314,1315c1308
<     if ((p = getpwnam(name)) == NULL){
<       getpwnam_err = errno;  /* CVE-2008-1668 */
- ---
>     if ((p = getpwnam(name)) == NULL)
1317d1309
<     }
2455,2464c2447,2452
<               /* CVE-2008-1668: pw check is introduced to avoid
unauthorised access */
<       if (((status = pam_process_pass(passwd, &pw) ) !=
PAM_SUCCESS) || ( pw  == NULL)) {
<                    reply(530, "Login incorrect.");
<                    if (logging){
<                       if ( pw == NULL  && getpwnam_err )
<                               syslog(LOG_ERR,"getpwnam failed :
%s",strerror(getpwnam_err));
<                       else
<                               syslog(LOG_INFO, "User %s: Login
incorrect", the_user);
<                   }
<                     if (++login_attempts >= lgi_failure_threshold){
- ---
>                 if ((status = pam_process_pass (passwd, &pw)) !=
> PAM_SUCCESS) {
>                         reply(530, "Login incorrect.");
>                         if (logging)
>                                syslog(LOG_INFO, "User %s: Login
> incorrect", the_user);
>                         if (++login_attempts >=
> lgi_failure_threshold)
>                         {

Problem description
====================

SSRT080051 (CVE-2008-1668):
WU-FTP2.4 Security issue problem setting up user environment

Problem Statement:

WU-FTPD2.4 allows a user to login even if the user does not have an entry in the passwd(4) file.  The user
incorrectly gets 'root'
access.

Detail Analysis:

This issue occurs when LDAP is used for pam(3) authentication and the
nsswitch.conf(4) file does not include 'ldap' as a source for the 'passwd' database.

When a client tries to FTP LOGIN as a user included in an LDAP directory, where the FTP server machine is not
configured correctly (i.e. pam(3) is configured to use LDAP but nsswitch.conf(4) has no entry for ldap
against 'passwd') then the pam authentication passes (because pam(3) is using ldap for authentication)
but getpwnam(3C) fails to get the users details (as nsswitch.conf(4) has no entry for ldap).

In this situation user is incorrectly given root privileges thus causing a Security issue.

In short, ftpd allows a user to login as root if pam(3) authentication passes and getpwnam(3C) returns NULL.

Note1: getpwnam(3C) gets an entry from the databases listed in
nsswitch.conf(4) and if no entry for the user present is present
getpwnam(3C) will return NULL.

Note2: This problem may also occur when using database sources other than LDAP  (LDAP was used in all our
testing).  The primary factor is successful pam(3) authentication followed by a failure to retrieve user details.

Note3: It is possible to see this problem where an ldapclientd hang occurs, such that the correct
nsswitch.conf(4) configuration is in place but the ldap client does not return correctly.

To get the security-alert PGP keys, please send an e-mail message as
follows:
  To: security-alert@...
  Subject: get key

Yours truly,
John
john.morris@...
HP Software Security Response Team (SSRT)

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.1

iQA/AwUBSKxbTOAfOvwtKn1ZEQICFgCfXF1ZGFfiv6IWyj2G9y8qoVL8V8UAn04p
tw+XG57pY4RqsxjkAEDtwNtg
=tsWs
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

SUPPORT COMMUNICATION - SECURITY BULLETIN

Document ID: c01525562
Version: 1

HPSBUX02356 SSRT080051 rev.1 - HP-UX Running ftpd, Remote Privileged Access

NOTICE: The information in this Security Bulletin should be acted upon as soon as possible.

Release Date: 2008-08-12
Last Updated: 2008-08-12

Potential Security Impact: Remote privileged access

Source: Hewlett-Packard Company, HP Software Security Response Team

VULNERABILITY SUMMARY
A potential security vulnerability has been identified with HP-UX running ftpd. The vulnerability could
be exploited to allow remote privileged access.

References: CVE-2008-1668

SUPPORTED SOFTWARE VERSIONS*: ONLY impacted versions are listed.
HP-UX B.11.11 running ftpd

BACKGROUND

CVSS 2.0 Base Metrics 
===============================================
Reference                         Base Vector               Base Score 
CVE-2008-1668     (AV:N/AC:H/Au:N/C:N/I:N/A:C)      7.6
===============================================
Information on CVSS is documented in HP Customer Notice: HPSN-2008-002.

Note: Two versions of ftpd are available for HP-UX B.11.11. The version delivered in the base operating
system is based on wu-ftpd v2.4.x. A web update is available to install v2.6.x. This Security Bulletin
applies to v2.4.x only. 

RESOLUTION

HP has made the following software patch available to resolve the vulnerability.

The patch can be downloaded from http://itrc.hp.com 
 
OS/Product Version - HP-UX B.11.11 running ftpd
Action - Install PHNE_38458 or subsequent
 
MANUAL ACTIONS: No 

PRODUCT SPECIFIC INFORMATION 

HP-UX Software Assistant: HP-UX Software Assistant is an enhanced application that replaces HP-UX
Security Patch Check. It analyzes all Security Bulletins issued by HP and lists recommended actions that
may apply to a specific HP-UX system. It can also download patches and create a depot automatically. For
more information see: https://www.hp.com/go/swa 

The following text is for use by the HP-UX Software Assistant.

AFFECTED VERSIONS

HP-UX B.11.11 
============= 
InternetSrvcs.INETSVCS-RUN 
action: install PHNE_38458 or subsequent. 
URL: http://itrc.hp.com 

END AFFECTED VERSIONS

HISTORY 
Version: 1 (rev.1) - 12 August 2008 Initial release 

Third Party Security Patches: Third party security patches that are to be installed on systems running HP
software products should be applied in accordance with the customer's patch management policy. 

Support: For further information, contact normal HP Services support channel.

Report: To report a potential security vulnerability with any HP supported product, send Email to:
security-alert <at> hp.com 
It is strongly recommended that security related information being communicated to HP be encrypted using
PGP, especially exploit information. 
To get the security-alert PGP key, please send an e-mail message as follows:
  To: security-alert <at> hp.com 
  Subject: get key

Subscribe: To initiate a subscription to receive future HP Security Bulletins via Email:

http://h30046.www3.hp.com/driverAlertProfile.php?regioncode=NA&langcode=USENG&jumpid=in_SC-GEN__driverITRC&topiccode=ITRC 
On the web page: ITRC security bulletins and patch sign-up 
Under Step1: your ITRC security bulletins and patches 
  - check ALL categories for which alerts are required and continue.
Under Step2: your ITRC operating systems 
  - verify your operating system selections are checked and save.


To update an existing subscription: http://h30046.www3.hp.com/subSignIn.php 
Log in on the web page: Subscriber's choice for Business: sign-in. 
On the web page: Subscriber's Choice: your profile summary - use Edit Profile to update appropriate sections.


To review previously published Security Bulletins visit:
http://www.itrc.hp.com/service/cki/secBullArchive.do 


* The Software Product Category that this Security Bulletin relates to is represented by the 5th and 6th
characters of the Bulletin number in the title: 

GN = HP General SW
MA = HP Management Agents
MI = Misc. 3rd Party SW
MP = HP MPE/iX
NS = HP NonStop Servers
OV = HP OpenVMS
PI = HP Printing & Imaging
ST = HP Storage SW
TL = HP Trusted Linux
TU = HP Tru64 UNIX
UX = HP-UX
VV = HP VirtualVault
 
System management and security procedures must be reviewed frequently to maintain system integrity. HP
is continually reviewing and enhancing the security features of software products to provide customers
with current secure solutions.


"HP is broadly distributing this Security Bulletin in order to bring to the attention of users of the
affected HP products the important security information contained in this Bulletin. HP recommends that
all users determine the applicability of this information to their individual situations and take
appropriate action. HP does not warrant that this information is necessarily accurate or complete for
all user situations and, consequently, HP will not be responsible for any damages resulting from user's
use or disregard of the information provided in this Bulletin. To the extent permitted by law, HP
disclaims all warranties, either express or implied, including the warranties of merchantability and
fitness for a particular purpose, title and non-infringement."

©Copyright 2008 Hewlett-Packard Development Company, L.P. 

Hewlett-Packard Company shall not be liable for technical or editorial errors or omissions contained
herein. The information provided is provided "as is" without warranty of any kind. To the extent
permitted by law, neither HP or its affiliates, subcontractors or suppliers will be liable for
incidental, special or consequential damages including downtime cost; lost profits; damages relating
to the procurement of substitute products or services; or damages for loss of data, or software
restoration. The information in this document is subject to change without notice. Hewlett-Packard
Company and the names of Hewlett-Packard products referenced herein are trademarks of Hewlett-Packard
Company in the United States and other countries. Other product and company names mentioned herein may be
trademarks of their respective owners.
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.1

iQA/AwUBSKGKR+AfOvwtKn1ZEQJnrACg3cMUnAJj7GACq3u6VVntn0EVg6cAn08u
PtkQA9ODrrBv/ietbLoQlch0
=Wu3n
-----END PGP SIGNATURE-----

Gmane