CERT® Advisory CA-2003-25 Buffer Overflow in Sendmail
Original issue date: September 18, 2003
Last revised: September 29, 2003
Source: CERT/CC
A complete revision history is at the end of this file.
Systems Affected
- Systems running open-source sendmail versions prior to 8.12.10, including UNIX and Linux systems
- Commercial releases of sendmail including Sendmail Switch, Sendmail Advanced Message Server (SAMS), and Sendmail for NT
Overview
A vulnerability in sendmail could allow a remote attacker to execute
arbitrary code with the privileges of the sendmail daemon, typically
root.
I. Description
Sendmail is a widely deployed mail transfer agent (MTA). Many UNIX
and Linux systems provide a sendmail implementation that is enabled
and running by default. Sendmail contains a vulnerability in its
address parsing code. An error in the prescan() function could allow an attacker to
write past the end of a buffer, corrupting memory structures.
Depending on platform and operating system architecture, the attacker
may be able to execute arbitrary code with a specially crafted email
message.
This vulnerability is different than the one described in CA-2003-12.
The email attack vector is message-oriented as opposed to
connection-oriented. This means that the vulnerability is triggered
by the contents of a specially crafted email message rather than by
lower-level network traffic. This is important because an MTA that
does not contain the vulnerability may pass the malicious message
along to other MTAs that may be protected at the network level. In
other words, vulnerable sendmail servers on the interior of a network
are still at risk, even if the site's border MTA uses software other
than sendmail.
Also, messages capable of exploiting this
vulnerability may pass undetected through packet filters or firewalls.
Further information is available in VU#784980. Common Vulnerabilities and Exposures (CVE) refers to this issue as CAN-2003-0694.
II. Impact
Depending on platform and operating system architecture, a remote
attacker could execute arbitrary code with the privileges of the
sendmail daemon. Unless the RunAsUser option is set, Sendmail typically runs as root.
III. Solution
Upgrade or apply a patch
This vulnerability is resolved in Sendmail 8.12.10. Sendmail has also released a patch that can be applied to Sendmail 8.9.x through 8.12.9. Information about specific vendors is available in Appendix A. and in the Systems Affected section of VU#784980.
Sendmail 8.12.10 is designed to correct malformed messages that are transferred by the server. This should help protect other vulnerable sendmail servers.
Enable the RunAsUser option
While there is no known complete workaround, consider setting the
RunAsUser option to reduce the impact of this vulnerability. It is
typically considered to be a good security practice to limit the
privileges of applications and services whenever possible.
Appendix A. Vendor Information
This appendix contains information provided by vendors. When vendors
report new information, this section is updated, and the changes are
noted in the revision history. If a vendor is not listed below, we
have not received their direct statement. Further vendor information
is available in the Systems
Affected section of VU#784980.
Mac OS X 10.2.8 contains the patches to address CVE CAN-2003-0694 and CAN-2003-0681 to fix a buffer overflow in address parsing, as well as a potential buffer overflow in ruleset parsing.
Mac OS X 10.2.8 is available as a free update for customers running Mac OS X 10.2.x. It is available from:
Mac OS X Client (updating from 10.2 - 10.2.5):
http://www.info.apple.com/kbnum/n120244
Mac OS X Client (updating from 10.2.6 - 10.2.7):
http://www.info.apple.com/kbnum/n120245
Mac OS X Server (updating from 10.2 - 10.2.5):
http://www.info.apple.com/kbnum/n120246
Mac OS X Server (updating from 10.2.6 - 10.2.7):
http://www.info.apple.com/kbnum/n120247
The sendmail and sendmail-wide packages are vulnerable to this issue. Updated packages are being prepared and will be available soon. [DSA-384]
BIG-IP and 3-DNS products are not vulnerable.
FreeBSD was affected, and all details are available at
<URL: ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-03:13.sendmail.asc>
SOURCE: Hewlett-Packard Company Software Security Response Team (SSRT)
Date: 18 September, 2003
CROSS REFERENCE ID: SSRT3631
At the time of writing this document, Hewlett Packard is currently investigating the potential impact to HP released operating system software.
HP will provide notice of the availability of any necessary patches through standard security bulletin announcements and be available from your normal HP Services support channel.
To report any security issue for any HP software products send email to security-alert@hp.com
The AIX Security Team is aware of the issues discussed in CERT
Vulnerability Note VU#784980 and CERT Advisory CA-2003-25.
The following APARs will be released to address this issue:
APAR number for AIX 4.3.3: IY48659 (available approx. 10/03/03)
APAR number for AIX 5.1.0: IY48658 (available approx. 10/15/03)
APAR number for AIX 5.2.0: IY48657 (available approx. 10/29/03)
An e-fix will be available shortly. The e-fix will be available from:
ftp://ftp.software.ibm.com/aix/efixes/security/sendmail_4_efix.tar.Z
This vendor statement will be updated when the e-fix becomes available.
This is a sendmail-specific issue that does not affect any Lotus products.
NetApp products are not vulnerable to this problem.
NetBSD-current ships with sendmail 8.12.9 since June 1, 2003. The patch was applied on September 17, 2003. In the near future we would upgrade to sendmail 8.12.10.
Our official releases, such as NetBSD 1.6.1, are also affected (they ship with older version of sendmail). They will be patched as soon as possible. We would issue NetBSD Security Advisory on this matter.
Openwall GNU/*/Linux is not vulnerable. We ship Postfix, not Sendmail.
Red Hat Linux and Red Hat Enterprise Linux ship with a Sendmail package vulnerable to these issues. Updated Sendmail packages are available along with our advisory at the URLs below. Users of the Red Hat Network can update their systems using the 'up2date' tool.
Red Hat Linux:
http://rhn.redhat.com/errata/RHSA-2003-283.html
Red Hat Enterprise Linux:
http://rhn.redhat.com/errata/RHSA-2003-284.html
Sidewinder(r) and Sidewinder G2 Firewall(tm) (including all appliances)
Not Vulnerable.
Sidewinder v5.x & Sidewinder G2 v6.x's embedded Type Enforcement(r) technology strictly limits the capabilities of Secure Computing's modified version of the Sendmail code integrated into the firewall's SecureOS operating system. Any attempt to exploit this vulnerability in the Sendmail code running on the firewalls results in an automatic termination of the attacker's connection and multiple Type Enforcement alarms.
Gauntlet(tm) & Gauntlet e-ppliance
Vulnerable.
Gauntlet and Gauntlet e-ppliance firewalls have limited vulnerability to this exploit. The sendmail daemon runs without root privilege, containing the effect of any exploit.
Gauntlet customers should obtain a sendmail patch from the appropriate OS vendor. Gauntlet e-ppliance customers should contact Secure Computing Customer Support for a Gauntlet e-ppliance patch.
The Sendmail Consortium recommends that sites upgrade to 8.12.10
whenever possible. Alternatively, patches are available for 8.9,
8.10, 8.11, and 8.12 on http://www.sendmail.org/.
All commercial releases including Sendmail Switch, Sendmail
Advanced Message Server (which includes the Sendmail Switch MTA), and
Sendmail for NT are affected by this issue. Patch
information is available at http://www.sendmail.com/security/.
Sun acknowledges that our versions of sendmail on Solaris releases 7, 8 and 9 are affected by this issue. The affected versions of sendmail are 8.11.7+Sun (and earlier) on S7 and S8, and 8.12.9+Sun (and earlier) on S9. The new versions with the fix will be 8.11.7p1+Sun on S7 and S8, and 8.12.10+Sun on S9.
A Sun Alert for this issue will be issued soon and will be available from:
http://sunsolve.Sun.COM/pub-cgi/retrieve.pl?doc=fsalert/56860
SuSE products shipping sendmail are affected. Update packages that fix the
vulnerability are being prepared and will be published shortly. [SuSE-SA:2003:040]
Syntegra is not affected by this problem.
Appendix B. References
This vulnerability was discovered by Michal Zalewski. Thanks to Claus Assmann and Eric Allman of Sendmail for their help in preparing this document.
Feedback can be directed to the author, Art Manion.
This document is available from:
http://www.cert.org/advisories/CA-2003-25.html
CERT/CC Contact Information
Email: cert@cert.org
Phone: +1 412-268-7090 (24-hour hotline)
Fax: +1 412-268-6989
Postal address:
-
CERT Coordination Center
Software Engineering Institute
Carnegie Mellon University
Pittsburgh PA 15213-3890
U.S.A.
CERT/CC personnel answer the hotline 08:00-17:00 EST(GMT-5) / EDT(GMT-4)
Monday through Friday; they are on call for emergencies during other
hours, on U.S. holidays, and on weekends.
Using encryption
We strongly urge you to encrypt sensitive information sent by
email. Our public PGP key is available from
If you prefer to use DES, please call the CERT hotline for more
information.
Getting security information
CERT publications and other security information are available from
our web site
* "CERT" and "CERT Coordination Center" are registered in the U.S. Patent and Trademark Office.
NO WARRANTY
Any material furnished by Carnegie Mellon University and the
Software Engineering Institute is furnished on an "as is"
basis. Carnegie Mellon University makes no warranties of any kind,
either expressed or implied as to any matter including, but not
limited to, warranty of fitness for a particular purpose or
merchantability, exclusivity or results obtained from use of the
material. Carnegie Mellon University does not make any warranty of any
kind with respect to freedom from patent, trademark, or copyright
infringement.
Conditions for use, disclaimers, and sponsorship information
Copyright 2003 Carnegie Mellon University.
Revision History
September 18, 2003: Initial release, updated Sun and IBM statements, added Debian reference, added HP statement
September 24, 2003: Updated SuSE statement, added Apple and FreeBSD statements
September 25, 2003: Added Syntegra statement
September 29, 2003: Added Secure Computing statement