Juniper Networks
Solutions
Products & Services
Company
Partners
Support
Education

Signature Detail

Security Intelligence Center
Signatures
Print

Short Name

SCAN:MISC:FTP:OPENBSD-X86

Severity

Low

Recommended

No

Category

SCAN

Keywords

BSD FTPd x86 Overflow

Release Date

2003/04/22

Update Number

1213

Supported Platforms

idp-4.0+, isg-3.0+, j-series-9.5+, mx-9.4+, srx-9.2+, srx-branch-9.4+, vsrx-12.1+

SCAN: BSD FTPd x86 Overflow


This signature detects attempts to exploit a known vulnerability against ftpd in OpenBSD. OpenBSD versions 2.7 and 2.8, FTP code revisions 1.49 to 1.79 are vulnerable. Attackers with write access can exploit the replydirname() function in BSD-based ftpd daemons, to gain root access.

Extended Description

The ftp daemon derived from 4.x BSD source contains a serious vulnerability that may compromise root access. There exists a one byte overflow in the replydirname() function. The overflow condition is due to an off-by-one bug that allows an attacker to write a null byte beyond the boundaries of a local buffer and over the lowest byte of the saved base pointer. As a result, the numerical value of the pointer decreases (and it thus points to a higher location (or lower address) on the stack than it should) and when the replydirname() function returns, the modified saved base pointer is stored in the base pointer register. When the calling function returns, the return address is read from an offset of where the base pointer points to. With the last byte of the base pointer zero, this will be a location other than where it should be. If this region of the stack is under the control of the attacker, such as the local variable which contained the extra byte in the first place, an arbitrary address can be placed there that will be used as the saved return address by the function. This is the case in ftpd. It is possible for an attacker to force the ftp daemon to look in user-supplied data for a return address and then execute instructions at the location as root. This vulnerability can be exploited on systems supporting anonymous ftp if a writeable directory exists (such as an "incoming" directory). This is rarely in place by default. It should noted that OpenBSD ships with ftp disabled, though it is an extremely commonly used service.

Affected Products

  • BSD ftpd 0.3.2
  • David A. Holland linux-ftpd 0.17.0
  • David Madore ftpd-BSD 0.2.3
  • NetBSD 1.4.0
  • NetBSD 1.4.1
  • NetBSD 1.4.2
  • NetBSD 1.5.0
  • OpenBSD 2.4.0
  • OpenBSD 2.5.0
  • OpenBSD 2.6.0
  • OpenBSD 2.7.0
  • OpenBSD 2.8.0

References

  • BugTraq: 2124
  • CVE: CVE-2001-0053
  • URL: http://www.kb.cert.org/vuls/id/593299

Site Map
RSS Feeds
Careers
Accessibility
Feedback
Privacy Policy
Legal Notices
Copyright © 1999-2010 Juniper Networks, Inc. All rights reserved.
Help
|
My Account
|
Log Out