Multiple Vendor BSD ftpd glob() Buffer Overflow Vulnerabilities
BID:2548
Info
Multiple Vendor BSD ftpd glob() Buffer Overflow Vulnerabilities
| Bugtraq ID: | 2548 |
| Class: | Boundary Condition Error |
| CVE: |
CVE-2001-0247 |
| Remote: | Yes |
| Local: | No |
| Published: | Apr 09 2001 12:00AM |
| Updated: | Jul 11 2009 06:06AM |
| Credit: | This vulnerability was discovered by Anthony Osborne and John McDonald of NAI's COVERT labs and published on April 9, 2001. |
| Vulnerable: |
SGI IRIX 6.5.11 SGI IRIX 6.5.10 SGI IRIX 6.5.8 SGI IRIX 6.5.7 SGI IRIX 6.5.6 SGI IRIX 6.5.5 SGI IRIX 6.5.4 SGI IRIX 6.5.3 m SGI IRIX 6.5.3 f SGI IRIX 6.5.3 SGI IRIX 6.5.2 m SGI IRIX 6.5.1 SGI IRIX 6.5 OpenBSD OpenBSD 2.8 OpenBSD OpenBSD 2.7 OpenBSD OpenBSD 2.6 OpenBSD OpenBSD 2.5 OpenBSD OpenBSD 2.4 OpenBSD OpenBSD 2.3 NetBSD NetBSD 1.5 NetBSD NetBSD 1.4.3 NetBSD NetBSD 1.4.2 NetBSD NetBSD 1.4.1 NetBSD NetBSD 1.4 NetBSD NetBSD 1.3.3 NetBSD NetBSD 1.3.2 NetBSD NetBSD 1.3.1 NetBSD NetBSD 1.3 NetBSD NetBSD 1.2.1 MIT Kerberos 5 1.2.2 MIT Kerberos 5 1.2.1 MIT Kerberos 5 1.2 MIT Kerberos 5 1.1.1 FreeBSD FreeBSD 4.2 FreeBSD FreeBSD 4.1.1 FreeBSD FreeBSD 4.1 FreeBSD FreeBSD 4.0 FreeBSD FreeBSD 3.5.1 FreeBSD FreeBSD 3.5 FreeBSD FreeBSD 3.4 FreeBSD FreeBSD 3.3 FreeBSD FreeBSD 3.2 FreeBSD FreeBSD 3.1 FreeBSD FreeBSD 3.0 FreeBSD FreeBSD 2.2.8 FreeBSD FreeBSD 2.2.6 FreeBSD FreeBSD 2.2.5 FreeBSD FreeBSD 2.2.4 FreeBSD FreeBSD 2.2.3 FreeBSD FreeBSD 2.2.2 FreeBSD FreeBSD 2.2 Compaq Tru64 5.1 a PK1 (BL1) Compaq Tru64 5.1 a Compaq Tru64 5.1 PK4 (BL18) Compaq Tru64 5.1 PK3 (BL17) Compaq Tru64 5.1 Compaq Tru64 5.0 f Compaq Tru64 5.0 a PK3 (BL17) Compaq Tru64 5.0 a Compaq Tru64 5.0 PK4 (BL18) Compaq Tru64 5.0 PK4 (BL17) Compaq Tru64 5.0 Compaq Tru64 4.0 g PK3 (BL17) Compaq Tru64 4.0 g Compaq Tru64 4.0 f PK7 (BL18) Compaq Tru64 4.0 f PK6 (BL17) Compaq Tru64 4.0 f |
| Not Vulnerable: |
Compaq Tru64 5.1 a PK3 (BL3) Compaq Tru64 5.1 a PK2 (BL2) Compaq Tru64 5.1 PK5 (BL19) |
Discussion
Multiple Vendor BSD ftpd glob() Buffer Overflow Vulnerabilities
The BSD ftp daemon and derivatives (such as IRIX ftpd or the ftp daemon shipped with Kerberos 5) contain a number of buffer overflows that may lead to a compromise of root access to malicious users.
During parsing operations, the ftp daemon assumes that there can never be more than 512 bytes of user-supplied data. This is because that is usually how much data is read from a socket. Because of this assumption, certain memory copy operations involving user data lack bounds checking.
It is possible for users to use metacharacters to expand file/path names through interpretation by glob() and exploit these overflowable conditions. In order to do so, the attacker's ftp account must be able to either create directories or directories with long enough names must exist already.
Any attacker to successfully exploit this vulnerability would gain root access on the target host.
The BSD ftp daemon and derivatives (such as IRIX ftpd or the ftp daemon shipped with Kerberos 5) contain a number of buffer overflows that may lead to a compromise of root access to malicious users.
During parsing operations, the ftp daemon assumes that there can never be more than 512 bytes of user-supplied data. This is because that is usually how much data is read from a socket. Because of this assumption, certain memory copy operations involving user data lack bounds checking.
It is possible for users to use metacharacters to expand file/path names through interpretation by glob() and exploit these overflowable conditions. In order to do so, the attacker's ftp account must be able to either create directories or directories with long enough names must exist already.
Any attacker to successfully exploit this vulnerability would gain root access on the target host.
Exploit / POC
Multiple Vendor BSD ftpd glob() Buffer Overflow Vulnerabilities
CORE has developed a working commercial exploit for their IMPACT product. This exploit is not otherwise publicly available or known to be circulating in the wild.
A number of exploits have been published.
CORE has developed a working commercial exploit for their IMPACT product. This exploit is not otherwise publicly available or known to be circulating in the wild.
A number of exploits have been published.
Solution / Fix
Multiple Vendor BSD ftpd glob() Buffer Overflow Vulnerabilities
Solution:
MandrakeSoft released and advisory stating that the version of Proftpd distributed as part of Mandrake Linux is not vulnerable to glob() related buffer overflows.
OpenBSD has released a patch for the OpenBSD ftp daemon.
MIT has released source code patches for the ftp daemon shipped with Kerberos 5 1.2.2. Networks running older versions of Kerberos 5 should upgrade to 1.2.2, and apply the patch (listed below).
RedHat has released upgraded versions of their Kerberos 5 packages.
Immunix has released upgraded versions of their Kerberos 5 packages.
HP/Compaq has released fixes for Tru64.
MIT Kerberos 5 1.1.1
MIT Kerberos 5 1.2.2
OpenBSD OpenBSD 2.8
FreeBSD FreeBSD 3.0
FreeBSD FreeBSD 3.1
FreeBSD FreeBSD 3.2
FreeBSD FreeBSD 3.3
FreeBSD FreeBSD 3.4
FreeBSD FreeBSD 3.5
FreeBSD FreeBSD 3.5.1
FreeBSD FreeBSD 4.0
Compaq Tru64 4.0 g PK3 (BL17)
Compaq Tru64 4.0 f PK7 (BL18)
FreeBSD FreeBSD 4.1
FreeBSD FreeBSD 4.1.1
FreeBSD FreeBSD 4.2
Compaq Tru64 5.0 a PK3 (BL17)
Solution:
MandrakeSoft released and advisory stating that the version of Proftpd distributed as part of Mandrake Linux is not vulnerable to glob() related buffer overflows.
OpenBSD has released a patch for the OpenBSD ftp daemon.
MIT has released source code patches for the ftp daemon shipped with Kerberos 5 1.2.2. Networks running older versions of Kerberos 5 should upgrade to 1.2.2, and apply the patch (listed below).
RedHat has released upgraded versions of their Kerberos 5 packages.
Immunix has released upgraded versions of their Kerberos 5 packages.
HP/Compaq has released fixes for Tru64.
MIT Kerberos 5 1.1.1
-
Immunix 6.2 krb5-configs-1.1.1-27_StackGuard.i386.rpm
http://download.immunix.org/ImmunixOS/6.2/updates/RPMS/krb5-configs-1. 1.1-27_StackGuard.i386.rpm -
Immunix 6.2 krb5-devel-1.1.1-27_StackGuard.i386.rpm
http://download.immunix.org/ImmunixOS/6.2/updates/RPMS/krb5-devel-1.1. 1-27_StackGuard.i386.rpm -
Immunix 6.2 krb5-libs-1.1.1-27_StackGuard.i386.rpm
http://download.immunix.org/ImmunixOS/6.2/updates/RPMS/krb5-libs-1.1.1 -27_StackGuard.i386.rpm -
Immunix 6.2 krb5-server-1.1.1-27_StackGuard.i386.rpm
http://download.immunix.org/ImmunixOS/6.2/updates/RPMS/krb5-server-1.1 .1-27_StackGuard.i386.rpm -
Immunix 6.2 krb5-workstation-1.1.1-27_StackGuard.i386.rpm
http://download.immunix.org/ImmunixOS/6.2/updates/RPMS/krb5-workstatio n-1.1.1-27_StackGuard.i386.rpm -
Red Hat 6.2 alpha krb5-configs-1.1.1-27.alpha.rpm
ftp://updates.redhat.com/6.2/en/os/alpha/krb5-configs-1.1.1-27.alpha.r pm -
Red Hat 6.2 alpha krb5-devel-1.1.1-27.alpha.rpm
ftp://updates.redhat.com/6.2/en/os/alpha/krb5-devel-1.1.1-27.alpha.rpm -
Red Hat 6.2 alpha krb5-libs-1.1.1-27.alpha.rpm
ftp://updates.redhat.com/6.2/en/os/alpha/krb5-libs-1.1.1-27.alpha.rpm -
Red Hat 6.2 alpha krb5-server-1.1.1-27.alpha.rpm
ftp://updates.redhat.com/6.2/en/os/alpha/krb5-server-1.1.1-27.alpha.rp m -
Red Hat 6.2 alpha krb5-workstation-1.1.1-27.alpha.rpm
ftp://updates.redhat.com/6.2/en/os/alpha/krb5-workstation-1.1.1-27.alp ha.rpm -
Red Hat 6.2 i386 krb5-configs-1.1.1-27.i386.rpm
ftp://updates.redhat.com/6.2/en/os/i386/krb5-configs-1.1.1-27.i386.rpm -
Red Hat 6.2 i386 krb5-devel-1.1.1-27.i386.rpm
ftp://updates.redhat.com/6.2/en/os/i386/krb5-devel-1.1.1-27.i386.rpm -
Red Hat 6.2 i386 krb5-libs-1.1.1-27.i386.rpm
ftp://updates.redhat.com/6.2/en/os/i386/krb5-libs-1.1.1-27.i386.rpm -
Red Hat 6.2 i386 krb5-server-1.1.1-27.i386.rpm
ftp://updates.redhat.com/6.2/en/os/i386/krb5-server-1.1.1-27.i386.rpm -
Red Hat 6.2 i386 krb5-workstation-1.1.1-27.i386.rpm
ftp://updates.redhat.com/6.2/en/os/i386/krb5-workstation-1.1.1-27.i386 .rpm -
Red Hat 6.2 sparc krb5-configs-1.1.1-27.sparc.rpm
ftp://updates.redhat.com/6.2/en/os/sparc/krb5-configs-1.1.1-27.sparc.r pm -
Red Hat 6.2 sparc krb5-devel-1.1.1-27.sparc.rpm
ftp://updates.redhat.com/6.2/en/os/sparc/krb5-devel-1.1.1-27.sparc.rpm -
Red Hat 6.2 sparc krb5-libs-1.1.1-27.sparc.rpm
ftp://updates.redhat.com/6.2/en/os/sparc/krb5-libs-1.1.1-27.sparc.rpm -
Red Hat 6.2 sparc krb5-server-1.1.1-27.sparc.rpm
ftp://updates.redhat.com/6.2/en/os/sparc/krb5-server-1.1.1-27.sparc.rp m
MIT Kerberos 5 1.2.2
-
Immunix 7.0 krb5-devel-1.2.2-5_imnx.i386.rpm
http://download.immunix.org/ImmunixOS/7.0/updates/RPMS/krb5-devel-1.2. 2-5_imnx.i386.rpm -
Immunix 7.0 krb5-libs-1.2.2-5_imnx.i386.rpm
http://download.immunix.org/ImmunixOS/7.0/updates/RPMS/krb5-libs-1.2.2 -5_imnx.i386.rpm -
Immunix 7.0 krb5-server-1.2.2-5_imnx.i386.rpm
http://download.immunix.org/ImmunixOS/7.0/updates/RPMS/krb5-server-1.2 .2-5_imnx.i386.rpm -
Immunix 7.0 krb5-workstation-1.2.2-5_imnx.i386.rpm
http://download.immunix.org/ImmunixOS/7.0/updates/RPMS/krb5-workstatio n-1.2.2-5_imnx.i386.rpm -
MIT 1.2.2 ftpbuf_122_patch.txt
http://www.securityfocus.com/external/http://web.mit.edu/kerberos/www/ advisories/ftpbuf_122_patch.txt -
Red Hat 7.0 alpha krb5-devel-1.2.2-5.alpha.rpm
ftp://updates.redhat.com/7.0/en/os/alpha/krb5-devel-1.2.2-5.alpha.rpm -
Red Hat 7.0 alpha krb5-libs-1.2.2-5.alpha.rpm
ftp://updates.redhat.com/7.0/en/os/alpha/krb5-libs-1.2.2-5.alpha.rpm -
Red Hat 7.0 alpha krb5-server-1.2.2-5.alpha.rpm
ftp://updates.redhat.com/7.0/en/os/alpha/krb5-server-1.2.2-5.alpha.rpm -
Red Hat 7.0 alpha krb5-workstation-1.2.2-5.alpha.rpm
ftp://updates.redhat.com/7.0/en/os/alpha/krb5-workstation-1.2.2-5.alph a.rpm -
Red Hat 7.0 i386 krb5-devel-1.2.2-5.i386.rpm
ftp://updates.redhat.com/7.0/en/os/i386/krb5-devel-1.2.2-5.i386.rpm -
Red Hat 7.0 i386 krb5-libs-1.2.2-5.i386.rpm
ftp://updates.redhat.com/7.0/en/os/i386/krb5-libs-1.2.2-5.i386.rpm -
Red Hat 7.0 i386 krb5-server-1.2.2-5.i386.rpm
ftp://updates.redhat.com/7.0/en/os/i386/krb5-server-1.2.2-5.i386.rpm -
Red Hat 7.0 i386 krb5-workstation-1.2.2-5.i386.rpm
ftp://updates.redhat.com/7.0/en/os/i386/krb5-workstation-1.2.2-5.i386. rpm -
Red Hat 7.1 i386 krb5-devel-1.2.2-5.i386.rpm
ftp://updates.redhat.com/7.1/en/os/i386/krb5-devel-1.2.2-5.i386.rpm -
Red Hat 7.1 i386 krb5-libs-1.2.2-5.i386.rpm
ftp://updates.redhat.com/7.1/en/os/i386/krb5-libs-1.2.2-5.i386.rpm -
Red Hat 7.1 i386 krb5-server-1.2.2-5.i386.rpm
ftp://updates.redhat.com/7.1/en/os/i386/krb5-server-1.2.2-5.i386.rpm -
Red Hat 7.1 i386 krb5-workstation-1.2.2-5.i386.rpm
http://updates.redhat.com/7.1/en/os/i386/krb5-workstation-1.2.2-5.i386 .rpm
OpenBSD OpenBSD 2.8
-
OpenBSD 025_glob.patch
ftp://ftp.openbsd.org/pub/OpenBSD/patches/2.8/common/025_glob.patch
FreeBSD FreeBSD 3.0
-
FreeBSD 3.x glob.3.x.patch
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/glob.3.x.patch
FreeBSD FreeBSD 3.1
-
FreeBSD 3.x glob.3.x.patch
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/glob.3.x.patch
FreeBSD FreeBSD 3.2
-
FreeBSD 3.x glob.3.x.patch
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/glob.3.x.patch
FreeBSD FreeBSD 3.3
-
FreeBSD 3.x glob.3.x.patch
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/glob.3.x.patch
FreeBSD FreeBSD 3.4
-
FreeBSD 3.x glob.3.x.patch
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/glob.3.x.patch
FreeBSD FreeBSD 3.5
-
FreeBSD 3.x glob.3.x.patch
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/glob.3.x.patch
FreeBSD FreeBSD 3.5.1
-
FreeBSD 3.x glob.3.x.patch
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/glob.3.x.patch
FreeBSD FreeBSD 4.0
-
FreeBSD 4.x glob.4.x.patch
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/glob.4.x.patch
Compaq Tru64 4.0 g PK3 (BL17)
-
HP t64v40gb17-c0011101-15266-es-20020827.tar
Requires Tru64 V4.0g PK3 (BL17).
http://ftp.support.compaq.com/patches/public/unix/v4.0g/
Compaq Tru64 4.0 f PK7 (BL18)
-
HP duv40fb18-c0067201-15265-es-20020827.tar
Requires Tru64 Unix V4.0f PK7 (BL18).
http://ftp.support.compaq.com/patches/public/unix/v4.0f/
FreeBSD FreeBSD 4.1
-
FreeBSD 4.x glob.4.x.patch
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/glob.4.x.patch
FreeBSD FreeBSD 4.1.1
-
FreeBSD 4.x glob.4.x.patch
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/glob.4.x.patch
FreeBSD FreeBSD 4.2
-
FreeBSD 4.x glob.4.x.patch
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:33/glob.4.x.patch
Compaq Tru64 5.0 a PK3 (BL17)
-
HP t64v50ab17-c0018601-15270-es-20020827.tar
Requires Tru64 V5.0A PK3 (BL17).
http://ftp.support.compaq.com/patches/public/unix/v5.0a/
References
Multiple Vendor BSD ftpd glob() Buffer Overflow Vulnerabilities
References:
References:
- FreeBSD Security Information (FreeBSD)
- ftpd glob overflow exploit (CORE Security)
- KRB5 FTPD BUFFER OVERFLOWS (MIT)
- NetBSD Security Page (NetBSD)
- OpenBSD Security Information (OpenBSD)
- SGI Support (Silicon Graphics Inc.)