SecurityTracker.com
Keep Track of the Latest Vulnerabilities
with SecurityTracker!
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 
Sign Up
Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
Instant Alerts
Buy our Premium Vulnerability Notification Service to receive customized, instant alerts
Affiliates
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
Partners
Become a Partner and License Our Database or Notification Service
Report a Bug
Report a vulnerability that you have found to SecurityTracker
bugs
@
securitytracker.com






Category:   Application (E-mail Server)  >   Sendmail Vendors:   Sendmail Consortium
Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges
SecurityTracker Alert ID:  1006199
SecurityTracker URL:  http://securitytracker.com/id/1006199
CVE Reference:   CAN-2002-1337   (Links to External Site)
Date:  Mar 3 2003
Impact:   Execution of arbitrary code via local system, Execution of arbitrary code via network, Root access via local system, Root access via network
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 5.79 - 8.12.7
Description:   A buffer overflow vulnerability was reported in the Sendmail mail transfer agent (MTA). A remote user could execute arbitrary code with the privileges of the mail server (typically root privileges)

It is reported that the software contains an exploitable buffer overflow in the parsing of certain SMTP header elements. The report indicates that long sender or recipient header comments may trigger the flaw. A remote user could create a specially crafted message to cause arbitrary code to be executed on the target server. The target server could be the sending MTA, an intermediate MTA, or the destination MTA.

The vendor has labeled this bug as a "critical security problem."

The vendor credits Mark Dowd of ISS X-Force with reporting the flaw.

Another buffer overflow was reported in the processing of RFC 1413 ident protocol messages (this was discovered by a different user). According to the vendor, this is "non-exploitable."

Impact:   A remote user could execute arbitrary code with the privileges of the target server, which is typically root privileges. Any MTA processing the message may be affected.
Solution:   The vendor has released a fixed version (8.12.8), available at:

ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.12.8.tar.gz
ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.12.8.tar.gz.sig
ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.12.8.tar.Z
ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.12.8.tar.Z.sig

A patch is also available for version 8.12:

http://www.sendmail.org/patchcr.html

Various operating system distribution vendors will be issuing fix notices. See the Message History for those notices [Alerts will be posted as we receive them].

Vendor URL:  www.sendmail.org/8.12.8.html (Links to External Site)
Cause:   Boundary error
Underlying OS:   Linux (Any), UNIX (Any)

Message History:   This archive entry has one or more follow-up message(s) listed below.
(OpenBSD Issues Fix) Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   ("Todd C. Miller" <Todd.Miller@courtesan.com>)
OpenBSD has released a fix.
(Slackware Issues Fix) Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   (Slackware Security Team <security@slackware.com>)
Slackware has released a fix.
(IBM Issues Fix) Re: Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   (Shiva Persaud <shivapd@us.ibm.com>)
IBM has issued a fix for AIX.
(SGI Issues Fix) Re: Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   (SGI Security Coordinator <agent99@sgi.com>)
SGI has issued a fix.
(Sun Issues Fix) Re: Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges
Sun has issued a fix.
(HP Issues Fix for Tru64) Re: Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges
HP has issued ERPs for Tru64 UNIX.
(HP Issues Fix for HP-UX) Re: Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges
HP has issued patches for HP-UX.
(Apple Issues Fix) Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   (Product Security <product-security@apple.com>)
Apple has released a fix for Mac OS X.
(Red Hat Issues Fix) Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   (bugzilla@redhat.com)
Red Hat has released a fix.
(Conectiva Issues Fix) Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   (secure@conectiva.com.br)
Conectiva has released a fix.
(SuSE Issues Fix) Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   (Roman Drahtmueller <draht@suse.de>)
SuSE has released a fix.
(Mandrake Issues Fix) Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   (Mandrake Linux Security Team <security@linux-mandrake.com>)
Mandrake has released a fix.
(NetBSD Issues Fix) Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   (NetBSD Security Officer <security-officer@netbsd.org>)
NetBSD has released a fix.
(HP Issues Fix for VVOS) Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   (support_feedback@us-support2-mail.external.hp.com (IT Resource Center ))
The vendor has also released a fix for HP-UX 11.04 (VVOS).
(Caldera Issues Fix for OpenServer) Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   (security@sco.com)
Caldera has released a fix for SCO OpenServer.
(HP Issues Fix for MPE/iX) Sendmail Buffer Overflow in Parsing Certain Header Comments May Let Remote Users Execute Arbitrary Code with Root Privileges   (support_feedback@us-support2-mail.external.hp.com (IT Resource Center ))
HP has released a fix for MPE/iX sendmail.



 Source Message Contents

Date:  Mon, 3 Mar 2003 09:11:37 -0800 (PST)
Subject:  FreeBSD Security Advisory FreeBSD-SA-03:04.sendmail


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

=============================================================================
FreeBSD-SA-03:04.sendmail                                   Security Advisory
                                                          The FreeBSD Project

Topic:          sendmail header parsing buffer overflow

Category:       contrib
Module:         contrib_sendmail
Announced:      2003-03-03
Credits:        Mark Dowd (ISS)
Affects:        All releases prior to 4.8-RELEASE and 5.0-RELEASE-p4
                FreeBSD 4-STABLE prior to the correction date
Corrected:      2003-03-03
FreeBSD only:   NO

I.   Background

FreeBSD includes sendmail(8), a general purpose internetwork mail
routing facility, as the default Mail Transfer Agent (MTA).

II.  Problem Description

ISS has identified a buffer overflow that may occur during header
parsing in all versions of sendmail after version 5.79.

In addition, Sendmail, Inc. has identified and corrected a defect in
buffer handling within sendmail's RFC 1413 ident protocol support.

III. Impact

A remote attacker could create a specially crafted message that may
cause sendmail to execute arbitrary code with the privileges of the
user running sendmail, typically root.  The malicious message might be
handled (and therefore the vulnerability triggered) by the initial
sendmail MTA, any relaying sendmail MTA, or by the delivering sendmail
process.  Exploiting this defect is particularly difficult, but is
believed to be possible.

The defect in the ident routines is not believed to be exploitable.

IV.  Workaround

There is no workaround, other than disabling sendmail.

V.   Solution

Do one of the following:

1) Upgrade your vulnerable system to 4-STABLE; or to the RELENG_5_0,
RELENG_4_7, or RELENG_4_6 security branch dated after the correction
date (5.0-RELEASE-p4, 4.7-RELEASE-p7, or 4.6.2-RELEASE-p10,
respectively).

[NOTE: At the time of this writing, the FreeBSD 4-STABLE branch is
 labeled `4.8-RC1'.]

2) To patch your present system:

The following patch has been verified to apply to FreeBSD 5.0, 4.7,
and 4.6 systems.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail.patch
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail.patch.asc

b) Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch
# cd /usr/src/lib/libsm
# make obj && make depend && make
# cd /usr/src/lib/libsmutil
# make obj && make depend && make
# cd /usr/src/usr.sbin/sendmail
# make obj && make depend && make && make install

3) For i386 systems only, a patched sendmail binary is available.
Select the correct binary based on your FreeBSD version and whether or
not you want STARTTLS support.  If you want STARTTLS support, you must
have the crypto distribution installed.

a) Download the relevant binary from the location below, and verify
the detached PGP signature using your PGP utility.

ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.6-i386-crypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.6-i386-crypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.6-i386-nocrypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.6-i386-nocrypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.7-i386-crypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.7-i386-crypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.7-i386-nocrypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-4.7-i386-nocrypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-5.0-i386-crypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-5.0-i386-crypto.bin.gz.asc

ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-5.0-i386-nocrypto.bin.gz
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:04/sendmail-5.0-i386-nocrypto.bin.gz.asc

b) Install the binary.  Execute the following commands as root.
Note that these examples utilizes the FreeBSD 4.7 crypto binary.
Substitute BINARYGZ with the file name which you downloaded in
step (a).

# BINARYGZ=/path/to/sendmail-4.7-i386-crypto.bin.gz
# gunzip ${BINARYGZ}
# install -s -o root -g smmsp -m 2555 ${BINARYGZ%.gz} /usr/libexec/sendmail/sendmail

c) Restart sendmail.  Execute the following command as root.

# /bin/sh /etc/rc.sendmail restart

VI.  Correction details

The following list contains the revision numbers of each file that was
corrected in FreeBSD.

Path                                                             Revision
  Branch
- -------------------------------------------------------------------------
src/contrib/src/sendmail.h
src/contrib/sendmail/src/daemon.c
src/contrib/sendmail/src/headers.c
src/contrib/sendmail/src/main.c
src/contrib/sendmail/src/parseaddr.c
- -------------------------------------------------------------------------

VII. References

<URL: http://www.kb.cert.org/vuls/id/398025 >
<URL: http://www.iss.net/issEn/delivery/xforce/alertdetail.jsp?oid=21950 >
<URL: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2002-1337 >
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+Y4sVFdaIBMps37IRAudhAJ9eOnD1h6UOANKPpD4OW7lTk3tjnwCfV4sW
1KK2fkVaPFNIDC7VEPh+Aew=
=lWwz
-----END PGP SIGNATURE-----

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security-notifications" in the body of the message


 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

Copyright 2013, SecurityGlobal.net LLC