Microsoft KB Archive/326322

= MS02-037: The server response to an SMTP client EHLO command causes a buffer overrun =

Article ID: 326322

Article Last Modified on 10/26/2006

-

APPLIES TO


 * Microsoft Exchange Server 5.5 Service Pack 4
 * Microsoft Exchange Server 5.5 Standard Edition
 * Microsoft Exchange Server 5.5 Service Pack 1
 * Microsoft Exchange Server 5.5 Service Pack 2
 * Microsoft Exchange Server 5.5 Service Pack 3

-



This article was previously published under Q326322





SYMPTOMS
Exchange Server uses the Internet Mail Service to communicate with other mail servers by means of Simple Mail Transfer Protocol (SMTP). When the Internet Mail Service receives an SMTP extended Hello (EHLO) protocol command from a connecting SMTP server, the Internet Mail Service responds by sending a status reply that starts with the following line:

250- Hello

In that line:
 * is the fully qualified domain name (FQDN) of the Exchange Server computer.
 * is either the FQDN of the server that initiated the connection, or the IP address of the server that initiated the connection. The FQDN is used if the Exchange Server 5.5 Internet Mail Service can resolve this information by doing a reverse Domain Name System (DNS) lookup. The IP address is used if a reverse DNS lookup is not possible or does not resolve the connecting server's IP address.

A security vulnerability results because of an unchecked buffer in the Internet Mail Service code that generates the response to the EHLO protocol command. If the total length of the message exceeds a particular value, the data overruns the buffer. If the buffer is overrun with random data, the Internet Mail Service stops responding. However, if the buffer is overrun with carefully chosen data, an attacker may be able to run code in the security context of the Internet Mail Service, which runs as the Exchange Server 5.5 service account.

Important Note that the attacker cannot simply send data to the Internet Mail Service to overrun the buffer. Instead, the attacker has to create a set of conditions that cause the Internet Mail Service to overrun its own buffer when it generates the EHLO response. Specifically, the attacker has to ensure that a reverse DNS lookup not only succeeds, but provides an FQDN with a length that is sufficient to cause the buffer overrun.



RESOLUTION
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that you determine are at risk of attack. Evaluate the computer's physical accessibility, network and Internet connectivity, and other factors to determine the degree of risk to the computer. See the associated Microsoft Security Bulletin to help determine the degree of risk. This hotfix may receive additional testing. If the computer is sufficiently at risk, we recommend that you apply this hotfix now.

To resolve this problem immediately, download the hotfix by following the instructions later in this article or contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Note In special cases, charges that are ordinarily incurred for support calls may be canceled, if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Download Information
The following file is available for download from the Microsoft Download Center:

Download the Q326322 package now

Release Date: July 24, 2002

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to obtain Microsoft support files from online services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Installation Information
This update supports the following switches:
 * /x Generates a list of the packaged files. You can select the files that you want to extract and the location.
 * /s Performs a silent installation. This switch stops services and installs the fix with no prompts or user interface (UI). Allow sufficient time for the fix to be installed, because this switch returns control to the command prompt well before the installation is finished. Make sure that the fix is installed. The graphical user interface (GUI) fix package Q .exe should be running in the task manager properties (where  is the Microsoft Knowledge Base article Q number and name of the fix).
 * /z This switch is the same as the /x switch, but the /z switch automatically restarts the computer. Do not use the /z switch unless you want to automatically restart the computer.
 * /m Prompts you for the folder locations. You can select the folder locations of the Microsoft Windows folder, the System folder, the System32 folder, the Temp folder, the Source folder (which is usually the Temp folder), the System Windows folder, and the Language folder.

For example, the following command line installs the update without any user intervention and then does not force the computer to restart:

Q326322enui386 /s

File Information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.   Date          Time    Version       Size      File name and path --  12-JUL-2002   12:58   5.5.2656.59   209,680   %EXSRVROOT%\Bin\Imcmsg.dll 12-JUL-2002  12:59   5.5.2656.59   503,568   %EXSRVROOT%\Connect\Msexcimc\Bin\Msexcimc.exe Note Because of file dependencies, this update may contain additional files. This update requires Exchange Server 5.5 Service Pack 4.



STATUS
Microsoft has confirmed that this problem may cause a degree of security vulnerability in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
For additional information about this vulnerability, visit the following Microsoft Web site:

http://www.microsoft.com/technet/security/bulletin/MS02-037.mspx

Additional query words: security_patch

Keywords: kbhotfixserver kbqfe kbbug kbexchange550presp5fix kbfix kbqfe kbsecbulletin kbsechack kbsecurity kbsecvulnerability KB326322

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.