Pages in the Historical section of this site are provided for historical purposes, they are no longer maintained. Links may not work.

Original release date: November 29, 2001
Last revised: February 15, 2002
Source: CERT/CC

A complete revision history can be found at the end of this file.

Systems Affected

  • Systems running WU-FTPD and its derivatives

Overview

WU-FTPD is a widely deployed software package used to provide File Transfer Protocol (FTP) services on UNIX and Linux systems. There are two vulnerabilities in WU-FTPD that expose a system to potential remote root compromise by anyone with access to the FTP service. These vulnerabilities have recently received increased scrutiny.

I. Description

There are two remote code execution vulnerabilities in the Washington University FTP daemon (WU-FTPD). Both of these vulnerabilities have been discussed in public forums and have received widespread exposure.

VU#886083: WU-FTPD does not properly handle file name globbing

WU-FTPD features globbing capabilities that allow a user to specify multiple file names and locations using typical shell notation. See CERT Advisory CA-2001-07 for a more complete explanation of globbing.

WU-FTPD implements its own globbing code instead of using libraries in the underlying operating system. When the globbing code is called, it allocates memory on the heap to store a list of file names that match the expanded glob expression. The globbing code is designed to recognize invalid syntax and return an error condition to the calling function. However, when it encounters a specific string, the globbing code fails to properly return the error condition. Therefore, the calling function proceeds as if the glob syntax were correct and later frees unallocated memory that can contain user-supplied data.

If intruders can place addresses and shellcode in the right locations on the heap using FTP commands, they may be able to cause WU-FTPD to execute arbitrary code by later issuing a command that is mishandled by the globbing code.

This vulnerability is potentially exploitable by any user who is able to log in to a vulnerable server, including users with anonymous access. If the exploit is successful, an attacker may be able to execute arbitrary code with the privileges of WU-FTPD, typically root. If the exploit is unsuccessful, the thread servicing the request will fail, but the WU-FTPD process will continue to run.

Note that at least one derivative of WU-FTPD, BeroFTPD, is also vulnerable. BeroFTPD has been merged back into WU-FTPD and is no longer separately maintained.

This vulnerability has been assigned the identifier CAN-2001-0550 by the Common Vulnerabilities and Exposures (CVE) group:

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2001-0550

CORE Security Technologies has published a Vulnerability Report on this issue:

http://www.corest.com/pressroom/advisories_desplegado.php?
dxsection=10&idx=17

VU#639760: WU-FTPD configured to use RFC 931 authentication running in debug mode contains format string vulnerability

WU-FTPD can perform RFC 931 authentication when accepting inbound connections from clients. RFC 931 defines the Authentication Server Protocol, and is obsoleted by RFC 1413 which defines the Identity Protocol. RFC 931 is commonly known as "auth" or "authd", and RFC 1413 is commonly known "ident" or "identd". Both are named after the daemon that commonly provides the service.

When using RFC 931 authentication, WU-FTPD will request ident information before authorizing a connection request from a client. The auth or ident service running on the client returns user-specific information, allowing WU-FTPD to make authentication decisions based on data in the ident response.

WU-FTPD can also be run in debugging mode, which provides detailed information about its operation.

When WU-FTPD is configured to perform RFC 931 authentication and is run in debug mode, it logs connection information using syslog(3) function calls. The logging code does not include format string specifiers in some syslog(3) calls, nor does the code perform adequate input validation on the contents of the identd response received from a client. As a result, a crafted identd response containing user-supplied format string specifiers is interpreted by syslog(3), possibly overwriting arbitrary locations in memory. By carefully designing such a request, an attacker may execute arbitrary code with the privileges of WU-FTPD.

This vulnerability is potentially exploitable by any user who is able to log in to a vulnerable server, including users with anonymous access. The intruder must also be able to control their response to the ident request. If successful, an attacker may be able to execute arbitrary code with the privileges of WU-FTPD, typically root.

Note that this vulnerability does not manifest unless WU-FTPD is configured to use RFC 931 authentication and is run in debug mode.

This vulnerability has been assigned the identifier CVE-2001-0187 by the Common Vulnerabilities and Exposures (CVE) group:

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0187

II. Impact

Both of these vulnerabilities can be exploited remotely by any user with access to the FTP service, including anonymous access. Both vulnerabilities allow an intruder to execute arbitrary code with the privileges of WU-FTPD, typically root. An exploit attempt that does not succeed in executing code may crash WU-FTPD or end the connection used by the intruder.

For additional information about the impacts of each of these vulnerabilities, please consult the CERT Vulnerability Notes Database (http://www.kb.cert.org/vuls).

III. Solution

Apply patches from your vendor

Appendix A contains information for this advisory provided by vendors. As they 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. Please contact your vendor directly.

Although some distributions may not include WU-FTPD, it can be compiled and run on a wide variety of UNIX and Linux systems. If you install WU-FTPD separately, apply the source code patches from the WU-FTPD Development Group.

Restrict access to WU-FTPD

As a general practice, the CERT/CC recommends disabling services and access that are not explicitly required. You may wish to disable WU-FTPD until you are able to apply a patch.

If you cannot disable the service, you can limit your exposure to these vulnerabilities by blocking or restricting access to the control channel (by default, port 21/tcp) used by WU-FTPD. In the case of the format string vulnerability (VU#639760), an exploit would be transmitted from port 113/tcp on the attacking host to the WU-FTPD server that made the identd request. Note that blocking access from untrusted networks such as the Internet does not protect your systems against attacks from within your network.

Disable anonymous FTP access

Although disabling anonymous FTP access does not prevent attacks from occurring, it does prevent unauthenticated users from attempting to exploit the globbing vulnerability (VU#886083).

Appendix A. Vendor Information

This 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. Note that this advisory discusses two distinct vulnerabilities, and vendor statements may address one or both.

BeroFTPD

Parts of WU-FTPD's globbing code are shared by BeroFTPD, which is vulnerable to the glob handling problem described in VU#886083. BeroFTPD has been merged back into WU-FTPD and is no longer separately maintained.

Caldera

Caldera has addressed VU#886083 with the following Caldera Security Advisories:

Compaq Computer Corporation

This reported problem [VU#886083] could not be exploited on Compaq Tru64/UNIX Operating Systems Software. WU-FTPD 2.6.1 is shipped on the
Internet Express CD.

Conectiva

Conectiva has released the following Conectiva Linux Security Announcements:

Cray

Cray, Inc. is not vulnerable since the ftp supplied with UNICOS and UNICOS/mk is not based on the Washington University version. Cray did check their ftp code and does not see this exploit.

Debian

Debian has released the following Debian Security Advisories:

Fujitsu

Regarding VU#886083 and VU#639760 (WU-FTPD vulnerabilities), UXP/V is not vulnerable, because UXP/V does not support WU-FTPD.

Hewlett-Packard Company

HP's HP-UX is immune to this issue [VU#886083]. It was fixed in conjunction with the last "globbing" issue announced in CERT Advisory CA-2001-07, released April 10, 2001. The lab did a complete check/scan of the globbing software, and fixed this issue then as well. Customers should apply the patches listed in HP Security Bulletin #162 released July 19, 2001:
HPSBUX0107-162 Security Vulnerability in ftpd and ftp
Hewlett-Packard has addressed VU#639760 with Hewlett-Packard Company Security Bulletin HPSBUX0201-180:
HPSBUX0201-180 Sec. Vulnerability with WU-FTPD 2.6
Hewlett-Packard Security Bulletins are available at the IT Resource Center web site (registration required):
http://www.itresourcecenter.hp.com/

IBM Corporation

IBM's AIX operating system does not use WU-FTPD, hence is not vulnerable to the exploit described by CORE ST.

Immunix

Immunix has released the following Immunix OS Security Advisories:

MandrakeSoft

MandrakeSoft has addressed VU#886083 with Mandrake Linux Security Update Advisory MDKSA-2001:090:
http://www.linux-mandrake.com/en/security/2001/MDKSA-2001-090.php3

NcFTP Software

All versions of NcFTPd Server are not vulnerable to the problems described by VU#886083 and VU#639760.

OpenBSD

OpenBSD does not use WU-FTPD.

Red Hat

Red Hat has addressed VU#886083 with Red Hat Linux Errata Advisory RHSA-2001-157:
http://www.redhat.com/support/errata/RHSA-2001-157.html

SGI

SGI does not ship IRIX with WU-FTPD, so IRIX is not vulnerable to these issues.

Sun

Sun [Solaris] does not ship WU-FTPD, thus Solaris is not affected by these issues.

[Concerning VU#886083], the only Sun Cobalt Server Appliance that is vulnerable to this exploit is the Qube1. The Qube1 is no longer a supported appliance, but we do understand the need of having updates available. The following RPM is not officially supported by Sun Cobalt, but offers legacy customers the ability to maintain a limited level of security.

Qube1:

ftp://ftp.cobaltnet.com/pub/unsupported/qube1/rpms/
wu-ftpd-2.6.1-C1.NOPAM.mips.rpm

ftp://ftp.cobaltnet.com/pub/unsupported/qube1/srpms/
wu-ftpd-2.6.1-C1.NOPAM.src.rpm

SuSE

SuSE has addressed VU#886083 with SuSE Security Announcement SuSE-SA:2001:043.

Turbolinux

Turbolinux has addressed VU#886083 with Turbolinux Advisory
TLSA2002002.

WU-FTPD

The WU-FTPD Development Group has provided source code patches that address both of these issues in WU-FTPD 2.6.1:
The WU-FTPD Development Group has also released WU-FTPD 2.6.2 which addresses both of these issues:
ftp://ftp.wu-ftpd.org/pub/wu-ftpd/

The CERT Coordination Center thanks CORE Security Technologies and the WU-FTPD Development Group for their help


Author: Art Manion


References

Copyright 2002 Carnegie Mellon University.

Revision History

November 29, 2001:  initial release
November 30, 2001:  updated vendor information, CAN/CVE number, WU-FTPD 2.6.2, "Apply paches"
December  4, 2001:  updated vendor information, WU-FTPD patch locations, wrap long URLs
December 10, 2001:  included BeroFTPD information, updated title of VU#886083
December 17, 2001:  updated BeroFTPD information
January 10, 2002:  updated Caldera information
January 23, 2002:  updated HP information
February 4, 2002:  added Turbolinux and Compaq information
February 15, 2002:  updated Caldera information
  • No labels