Pine "From:" Field Buffer Overflow Vulnerability
BID:1709
Info
Pine "From:" Field Buffer Overflow Vulnerability
| Bugtraq ID: | 1709 |
| Class: | Boundary Condition Error |
| CVE: | |
| Remote: | Yes |
| Local: | Yes |
| Published: | Sep 23 2000 12:00AM |
| Updated: | Sep 23 2000 12:00AM |
| Credit: | This vulnerability was reported to bugtraq by Arkane on September 23, 2000. |
| Vulnerable: |
University of Washington Pine 4.21 University of Washington Pine 4.10 University of Washington Pine 4.0.4 |
| Not Vulnerable: | |
Discussion
Pine "From:" Field Buffer Overflow Vulnerability
A buffer overflow vulnerability exists in the popular mail client Pine 4.21 (and possibly earlier versions), relating to the function which regularly checks for incoming email. In standard e-mail message headers is a field that holds the name and address of the sender. It typically looks like and is presented in pine like this:
From: username <user@host>
Pine does not check the length of the username value when copying it into a memory buffer of predefined length. As a result, if a large "from" value is sent in the email header, it can corrupt "internal" memory when the offending function is called and the oversized buffer is copied onto the stack. An attacker can overwrite the return address of the function on the stack with a value that points back into the buffer, to which the function would return. Arbitrary machine instructions placed on the stack would then be executed.
The real concern here is that this requires no user interaction to exploit.. a target need only be using a vulnerable version of pine. The overflow occurs when the user recieves new email. While typically not yielding root privileges (unless root reads email with pine AS root) this can be used by a remote, anonymous attacker to gain local access to the target host.
A buffer overflow vulnerability exists in the popular mail client Pine 4.21 (and possibly earlier versions), relating to the function which regularly checks for incoming email. In standard e-mail message headers is a field that holds the name and address of the sender. It typically looks like and is presented in pine like this:
From: username <user@host>
Pine does not check the length of the username value when copying it into a memory buffer of predefined length. As a result, if a large "from" value is sent in the email header, it can corrupt "internal" memory when the offending function is called and the oversized buffer is copied onto the stack. An attacker can overwrite the return address of the function on the stack with a value that points back into the buffer, to which the function would return. Arbitrary machine instructions placed on the stack would then be executed.
The real concern here is that this requires no user interaction to exploit.. a target need only be using a vulnerable version of pine. The overflow occurs when the user recieves new email. While typically not yielding root privileges (unless root reads email with pine AS root) this can be used by a remote, anonymous attacker to gain local access to the target host.
Solution / Fix
Pine "From:" Field Buffer Overflow Vulnerability
Solution:
Several vendors have released new versions of the Pine package which address this vulnerability, including Slackware, FreeBSD, Mandrake and Red Hat.
For each vendor, the proper solution is to upgrade to the newer, fixed version.
University of Washington Pine 4.0.4
University of Washington Pine 4.10
University of Washington Pine 4.21
Solution:
Several vendors have released new versions of the Pine package which address this vulnerability, including Slackware, FreeBSD, Mandrake and Red Hat.
For each vendor, the proper solution is to upgrade to the newer, fixed version.
University of Washington Pine 4.0.4
-
Red Hat Inc. 5.2 alpha pine-4.30-1.52.alpha.rpm
ftp://updates.redhat.com/5.2/alpha/pine-4.30-1.52.alpha.rpm -
Red Hat Inc. 5.2 i386 pine-4.30-1.52.i386.rpm
ftp://updates.redhat.com/5.2/i386/pine-4.30-1.52.i386.rpm -
Red Hat Inc. 5.2 sparc pine-4.30-1.52.sparc.rpm
ftp://updates.redhat.com/5.2/sparc/pine-4.30-1.52.sparc.rpm
University of Washington Pine 4.10
-
MandrakeSoft 6.0 i386 pine-4.30-3.3mdk.i586.rpm
http://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/6.0/RPMS/ pine-4.30-3.3mdk.i586.rpm -
MandrakeSoft 6.1 i386 pine-4.30-3.3mdk.i586.rpm
http://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/6.1/RPMS/ pine-4.30-3.3mdk.i586.rpm -
MandrakeSoft 7.0 i386 pine-4.30-3.3mdk.i586.rpm
http://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/7.0/RPMS/ pine-4.30-3.3mdk.i586.rpm -
Red Hat Inc. 6.0 alpha pine-4.30-1.62.alpha.rpm
ftp://updates.redhat.com/6.0/alpha/pine-4.30-1.62.alpha.rpm -
Red Hat Inc. 6.0 i386 pine-4.30-1.62.i386.rpm
ftp://updates.redhat.com/6.0/i386/pine-4.30-1.62.i386.rpm -
Red Hat Inc. 6.0 sparc pine-4.30-1.62.sparc.rpm
ftp://updates.redhat.com/6.0/sparc/pine-4.30-1.62.sparc.rpm -
RedHat 6.1 (Alpha): pine-4.30-1.62
ftp://updates.redhat.com/6.1/alpha/pine-4.30-1.62.alpha.rpm -
RedHat 6.1 (i386): pine-4.30-1.62
ftp://updates.redhat.com/6.1/i386/pine-4.30-1.62.i386.rpm -
RedHat 6.1 (Sparc): pine-4.30-1.62
ftp://updates.redhat.com/6.1/sparc/pine-4.30-1.62.sparc.rpm
University of Washington Pine 4.21
-
FreeBSD ports-3 i386 pine-4.21_1
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-3-stable/mail/pi ne-4.21_1.tgz -
FreeBSD ports-4 alpha pine-4.21_1
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/alpha/packages-4-stable/mail/p ine-4.21_1.tgz -
FreeBSD ports-4 i386 pine-4.21_1
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/mail/pi ne-4.21_1.tgz -
FreeBSD ports-5 alpha pine-4.21_1
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/alpha/packages-5-current/mail/ pine-4.21_1.tgz -
FreeBSD ports-5 i386 pine-4.21_1
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/mail/p ine-4.21_1.tgz -
MandrakeSoft 7.1 i386 pine-4.30-3.2mdk.i586.rpm
http://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/7.1/RPMS/ pine-4.30-3.2mdk.i586.rpm -
MandrakeSoft 7.2 i386 pine-4.30-3.1mdk.i586.rpm
http://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/7.2/RPMS/ pine-4.30-3.1mdk.i586.rpm -
RedHat 6.2 (Alpha): pine-4.30-1.62
ftp://updates.redhat.com/6.2/alpha/pine-4.30-1.62.alpha.rpm -
RedHat 6.2 (i386): pine-4.30-1.62
ftp://updates.redhat.com/6.2/i386/pine-4.30-1.62.i386.rpm -
RedHat 6.2 (Sparc): pine-4.30-1.62
ftp://updates.redhat.com/6.2/sparc/pine-4.30-1.62.sparc.rpm -
RedHat 7.0 (i386): pine-4.30-2
ftp://updates.redhat.com/7.0/i386/pine-4.30-2.i386.rpm -
Slackware Slackware: Pine 4.30
ftp://ftp.slackware.com/pub/slackware/slackware-current/slakware/n1/pi ne.tgz