-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =============================================================================== >> CERT-NL, 01-Mar-2000 << >> All CERT-NL information has been moved to http://cert.surfnet.nl. Links << >> to CERT-NL information contained in this advisory are therefore outdated. << >> << >> CERT-NL also has stopped the CERT-CC-Mirror service. Due to this the << >> links to the CERT-CC mirror are obsolete. Visit the CERT-CC site for the << >> complete CERT-CC advisory texts: http://www.cert.org << =============================================================================== =============================================================================== Security Advisory CERT-NL =============================================================================== Author/Source : Rene Ritzen Index : S-97-04 Distribution : World Page : 1 Classification: External Version: Subject : Sendmail 8.8.3 and 8.8.4 Vulnerability Date : 22-jan-97 =============================================================================== By courtesy of AUSCERT, the Australian CERT, we received information on a vulnerability in Sendmail 8.8.3 and 8.8.4. This information is made publicly available by AUSCERT advisory AA-97.02, dated 22-jan-97 CERT-NL recommends that sites apply the steps outlines in Section 3. Keywords: Sendmail, root privilige =============================================================================== AA-97.02 AUSCERT Advisory sendmail MIME conversion Buffer Overrun Vulnerability 22 January 1997 Last Revised: 22 January 1997 Fixed release date. - - - --------------------------------------------------------------------------- AUSCERT has received information that sendmail Versions 8.8.3 and 8.8.4 contain a serious security vulnerability. This vulnerability may allow remote users to execute arbitrary commands with root privileges. This vulnerability may be exploited on systems despite the presence of firewalls or other network boundary protective measures. AUSCERT recommends that sites take the steps outlined in Section 3 as soon as possible. - - - --------------------------------------------------------------------------- 1. Description A serious security vulnerability in sendmail Versions 8.8.3 and 8.8.4 has been discovered that allows remote users to execute arbitrary commands with root privileges. As part of its functionality, sendmail is able to perform limited 7 to 8 bit MIME conversions on email messages. Due to insufficient bounds checking while performing these conversions, it is possible to overwrite the internal stack space of sendmail while it is executing with root privileges. By sending a carefully crafted email message to a system running a vulnerable version of sendmail, intruders may be able to force sendmail to execute arbitrary commands with root privileges. In most cases, the MIME conversion of email is done on final delivery; that is, to the local mailbox or a program. Therefore this vulnerability may be exploited on systems despite the presence of firewalls and other network boundary protective measures. Systems are vulnerable to this attack if both of the following conditions are true: A. The version of sendmail is 8.8.3 or 8.8.4. To determine the version of sendmail, use the following command: % sendmail -d0 -bt < /dev/null | grep -i Version If the string returned is "Version 8.8.3" or "Version 8.8.4", then this version of sendmail is vulnerable. B. sendmail is configured to perform 7 to 8 bit MIME conversions. sendmail will perform 7 to 8 bit MIME conversions when the '9' flag is set as part of any Mailer specification in sendmail's configuration file. Examine the sendmail configuration file (usually, /etc/sendmail.cf). If the '9' flag is set in the "F=" (Flags) section for any Mailer specifications (sections starting with 'M' in the first column, such as "Mprog" or "Mlocal"), then this configuration is vulnerable. Use of the '9' flag can usually be determined using the following command (depending on your sendmail configuration): % grep '^M' /etc/sendmail.cf | grep 'F=[^,]*9' If any lines are displayed with this command, then the sendmail configuration may be vulnerable. The '9' flag is set by default when the sendmail.cf file is generated using the m4 files distributed with sendmail 8.8.x. Versions of sendmail prior to 8.8.0 did not set this flag by default when generating sendmail.cf. The '9' flag is also set by default in the precompiled example configuration files found in the cf/cf/obj/ subdirectory of the sendmail Version 8.8.x distribution. Although this vulnerability is similar to that described in AUSCERT Advisory AA-96.06a, it represents a new problem. Versions of sendmail prior to 8.8.3 contain other security vulnerabilities. AUSCERT encourages sites using those versions to upgrade to the current version of sendmail. 2. Impact Remote users may gain root privileges on systems using version 8.8.3 or 8.8.4 of sendmail that performs 7 to 8 bit conversion. 3. Workarounds/Solution AUSCERT recommends that sites upgrade to the current version of sendmail (Section 3.1). For sites that can not install the current version of sendmail, apply the workaround described in Section 3.2. 3.1 Upgrade to the current sendmail version Eric Allman has released a new version of sendmail (8.8.5) which fixes this vulnerability. This can be obtained from the following locations: ftp://ftp.sendmail.org/pub/sendmail/ ftp://ftp.cs.berkeley.edu/ucb/src/sendmail/ ftp://ftp.auscert.org.au/pub/mirrors/ftp.cs.berkeley.edu/ucb/sendmail/ ftp://ftp.cert.dfn.de/pub/tools/net/sendmail/ ftp://ftp.cert.org/pub/tools/sendmail/ The MD5 checksum for this distribution is: MD5 (sendmail.8.8.5.tar.gz) = 7c32c42a91325dd00b8518e90c26cffa MD5 (sendmail.8.8.5.tar.Z) = 7b847383899c0eb65987213a5caf89c8 MD5 (sendmail.8.8.5.patch) = 775c47d16d40ebd2b917dfcc65d92e90 The .Z file has the same contents as the .gz file, but is compressed using UNIX compress instead of gzip. A .sig file is also contained in the distribution. This is Eric Allman's PGP signature for the uncompressed tar file. The key fingerprint is Type bits/keyID Date User ID pub 1024/BF7BA421 1995/02/23 Eric P. Allman Key fingerprint = C0 28 E6 7B 13 5B 29 02 6F 7E 43 3A 48 4F 45 29 Eric P. Allman Eric P. Allman Eric P. Allman Eric P. Allman When changing to a new version of sendmail, it is strongly recommended that the configuration files are updated with those of the new version. Significant work has been done to make this task easier. (Note it is highly likely that older configuration files will not work correctly with sendmail version 8.) It is now possible to build a sendmail configuration file (sendmail.cf) using the configuration files provided with the sendmail release. Consult the cf/README file for a more complete explanation. Creating your configuration files using this method makes it easier to incorporate future changes to sendmail into your configuration files. 3.2 Workaround for existing sendmail Version 8.8.3 and 8.8.4 installations. Eric Allman, the author of sendmail, has provided the following workaround. Since the vulnerability occurs in the 7 to 8 bit conversion code, the problem described in this advisory can be avoided by disabling this functionality. This can be done by removing the F=9 flag from all Mailer specifications in the sendmail.cf file. For example, a sendmail.cf file with these changes applied should look similar to (depending on your system and configuration): Mlocal, P=/usr/libexec/mail.local, F=lsDFMAw5:/|@qrmn, S=10/30, R=20/40, T=DNS/RFC822/X-Unix, A=mail -d $u Mprog, P=/bin/sh, F=lsDFMoqeu, S=10/30, R=20/40, D=$z:/, T=X-Unix, A=sh -c $u This can be achieved for the "Mlocal" and "Mprog" Mailers by modifying the ".mc" file to include the following lines: define(`LOCAL_MAILER_FLAGS', ifdef(`LOCAL_MAILER_FLAGS', `translit(LOCAL_MAILER_FLAGS, `9')', `rmn')) define(`LOCAL_SHELL_FLAGS', ifdef(`LOCAL_SHELL_FLAGS', `translit(LOCAL_SHELL_FLAGS, `9')', `eu')) and then rebuilding the sendmail.cf file using m4(1). NOTE: The defines of LOCAL_MAILER_FLAGS and LOCAL_SHELL_FLAGS should be placed in your m4(1) input file *after* the operating system is identified using the OSTYPE directive, and after any other defines of either the LOCAL_MAILER_FLAGS or LOCAL_SHELL_FLAGS. It is possible to directly edit the sendmail.cf file to resolve this vulnerability. However, caution must be taken to ensure that the sendmail.cf file is not replaced in the future with a new version rebuilt from configuration files that include the '9' flag. Once the configuration file has been modified, all running versions of sendmail should be killed and the sendmail daemon restarted: kill -1 `head -1 /var/run/sendmail.pid` (The pathname may be different on your system.) Verify that a new daemon was started using "(echo quit; sleep 1) | telnet localhost 25". Alternatively, reboot your system. - - ---------------------------------------------------------------------------- AUSCERT thanks Eric Allman for his rapid response and technical input essential for the production of this advisory. Thanks also to DFN-CERT and CERT/CC for their assistance. - - - --------------------------------------------------------------------------- ============================================================================== CERT-NL is the Computer Emergency Response Team for SURFnet customers. SURFnet is the Dutch network for educational, research and related institutes. CERT-NL is a member of the Forum of Incident Response and Security Teams (FIRST). All CERT-NL material is available under: http://cert.surfnet.nl/ In case of computer or network security problems please contact your local CERT/security-team or CERT-NL (if your institute is NOT a SURFnet customer please address the appropriate (local) CERT/security-team). CERT-NL is one/two hour(s) ahead of UTC (GMT) in winter/summer, i.e. UTC+0100 in winter and UTC+0200 in summer (DST). Email: cert-nl@surfnet.nl ATTENDED REGULARLY ALL DAYS Phone: +31 302 305 305 BUSINESS HOURS ONLY Fax: +31 302 305 329 BUSINESS HOURS ONLY Snailmail: SURFnet bv Attn. CERT-NL P.O. Box 19035 NL - 3501 DA UTRECHT The Netherlands NOODGEVALLEN: 06 22 92 35 64 ALTIJD BEREIKBAAR EMERGENCIES : +31 6 22 92 35 64 ATTENDED AT ALL TIMES CERT-NL'S EMERGENCY PHONENUMBER IS ONLY TO BE USED IN CASE OF EMERGENCIES: THE SURFNET HELPDESK OPERATING THE EMERGENCY NUMBER HAS A *FIXED* PROCEDURE FOR DEALING WITH YOUR ALERT AND WILL IN REGULAR CASES RELAY IT TO CERT-NL IN AN APPROPRIATE MANNER. CERT-NL WILL THEN CONTACT YOU. =============================================================================== -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.1i iQA/AwUBOL6IRjSYjBqwfc9jEQKIswCgkQanLLPgYc98fjyPuUcquWKrVNkAoPrW 2qDakCg1EAgbvEQ8VPFuNdrp =FA96 -----END PGP SIGNATURE-----