Vulnerability Note VU#886083
WU-FTPD does not properly handle file name globbing
Overview
SecurityFocus and CORE Security Technologies have reported a vulnerability in WU-FTPD. WU-FTPD does not handle file name globbing properly and may allow an attacker to execute arbitrary code. WU-FTPD is a widely-used FTP daemon that is included in many UNIX and Linux distributions. This vulnerability was discussed on SecurityFocus' vuln-dev mailing list in April 2001.
Description
The CERT Coordination Center has received a report from SecurityFocus and CORE Security Technologies about a remote code execution vulnerability in the Washington University FTP daemon, WU-FTPD. The vulnerability manifests in WU-FTPD's handling of file name globbing. The problem is not a typical buffer overflow or format string vulnerability, but a combination of two bugs: WU-FTPD's globbing code does not properly return an error condition when interpreting the string '~{', and later frees memory which may contain user supplied data. When certain characters are encountered in the file name argument to an FTP command issued by a client, WU-FTPD calls its globbing code, which is implemented in glob.c. The globbing code should parse the argument string, set a variable if it encounters an error condition, and return a pointer to the expanded glob expression. The function that calls glob.c eventually uses free() to free the memory allocated to hold the expanded glob expression. A problem occurs when the globbing code fails to recognize the string '~{' as a malformed argument and does not set the error variable. The pointer returned by the globbing code references memory on the heap that contains arbitrary data instead of the expanded glob expression. If an attacker can place code of their choice in the right position on the heap, WU-FTPD may execute that code when freeing the memory referenced by the pointer that was returned by the globbing code. |
Impact
A remote attacker may be able to execute arbitrary code with the privileges of WU-FTPD, typically root. |
Solution
Apply Patch |
|
Systems Affected (Learn More)
| Vendor | Status | Date Notified | Date Updated |
|---|---|---|---|
| BeroFTPD | Affected | - | 17 Dec 2001 |
| Caldera | Affected | 21 Nov 2001 | 15 Feb 2002 |
| Conectiva | Affected | - | 30 Nov 2001 |
| Debian | Affected | 21 Nov 2001 | 04 Dec 2001 |
| FreeBSD | Affected | 21 Nov 2001 | 07 Dec 2001 |
| Immunix | Affected | - | 29 Nov 2001 |
| MandrakeSoft | Affected | 21 Nov 2001 | 07 Dec 2001 |
| RedHat | Affected | 21 Nov 2001 | 30 Nov 2001 |
| Sun | Affected | 21 Nov 2001 | 30 Nov 2001 |
| SuSE | Affected | - | 29 Nov 2001 |
| Turbolinux | Affected | - | 04 Feb 2002 |
| WU-FTPD Development Group | Affected | 20 Nov 2001 | 30 Nov 2001 |
| Cray | Not Affected | 21 Nov 2001 | 29 Nov 2001 |
| Fujitsu | Not Affected | 21 Nov 2001 | 30 Nov 2001 |
| Hewlett Packard | Not Affected | 21 Nov 2001 | 26 Nov 2001 |
CVSS Metrics (Learn More)
| Group | Score | Vector |
|---|---|---|
| Base | N/A | N/A |
| Temporal | N/A | N/A |
| Environmental | N/A | N/A |
References
- http://www.corest.com/pressroom/advisories_desplegado.php?idxsection=10&idx=172
- ftp://ftp.wu-FTPD.org/pub/wu-FTPD/patches/apply_to_current/ftpglob.patch
- http://www.securityfocus.com/bid/3581
- http://aris.securityfocus.com/alerts/wuFTPD/
- http://www.securityfocus.com/archive/82/180823
- http://xforce.iss.net/alerts/advise103.php
- http://www.wu-FTPD.org/
Credit
The CERT Coordination Center thanks CORE Security Technologies and Greg Lundberg for information used in this document. Matt Power of BindView originally reported this condition on the vuln-dev mailing list.
This document was written by Art Manion.
Other Information
- CVE IDs: CAN-2001-0550
- CERT Advisory: CA-2001-33
- Date Public: 30 Apr 2001
- Date First Published: 28 Nov 2001
- Date Last Updated: 28 Mar 2002
- Severity Metric: 21.89
- Document Revision: 35
Feedback
If you have feedback, comments, or additional information about this vulnerability, please send us email.