WelcomeEnterpriseSmall BusinessHome & Home OfficePartnersAbout Symantec

MS ASN1 Integer Overflow

Severity: High

This attack could pose a serious security threat. You should take immediate action to stop any damage or prevent further damage from happening.


Description

This signature detects an attempt to exploit an integer overflow in Microsoft's Abstract Syntax Notation1.


Additional Information

Microsoft Windows Abstract Syntax Notation 1 (ASN.1) handling Library (MSASN1.dll) is shipped as a part of the Microsoft Windows Operating System. The MSASN1 library provides an application programmer's interface into Microsoft ASN.1 encoding/decoding and processing functions.
Microsoft ASN.1 handling library has been reported prone to an integer overflow vulnerability that may result in arbitrary heap-based memory corruption. The issue presents itself in the ASN.1 BER decoding/encoding routines, specifically the ASN1BERDecBitString() function. ASN1BERDecBitString() handles constructed bit strings by concatenating each of the simple bit strings that comprise the compound one. The integer overflow occurs when a bit string is processed and the number of bits in the bit string is added to the cumulative total as follows:
lea eax, [ecx+eax+7]
This may provide a conduit for an attacker to trigger a boundary condition error. When the first bit string processed by ASN1BERDecBitString possesses a specified signed length of 0xfffffff9(-7), and then the aforementioned arithmetic (ecx+eax+7) sums the accumulated bits (0) with the signed length of the bit string (-7). The rounding value (+7) is then added to the total. This will result in a total assigned length of zero.
It has been reported that this value is then further processed by the DecMemReAlloc() function call, and ultimately results in a zero-byte chunk being allocated on the heap. The original bit string lengths are passed to the function ASN1bitcpy(). This function later performs a memcpy() operation to copy supplied bit string data into the zero-byte allocated heap based buffer. This operation will result in the corruption of heap based management structures, and may ultimately be leveraged by an attacker to have arbitrary code executed in the context of the affected process.
This vulnerability is exposed in a number of security related operating system components, including Kerberos (via UDP port 88), Microsoft IIS with SSL support enabled and NTLMv2 authentication (via TCP ports 135, 139 and 445). Other components may also be affected, though a comprehensive list is not available at this time. Client applications which use the library will be affected, including LSASS.EXE and CRYPT32.DLL (and any application that relies on CRYPT32.DLL). The vulnerable library is used frequently in components that handle certificates such as Internet Explorer and Outlook. Handling of signed ActiveX components could also present an exposure.
It should be noted that because ASN.1 data will likely be encoded, for example Kerberos, SSL, IPSec or Base64 encoded, the malicious integer values may be obfuscated and as a result not easily detectable.
This vulnerability was originally covered in BID 9626, but further information has been made available which identifies a number of distinct vulnerabilities in the library and so this specific issue has been assigned an individual BID.


Affected:

Avaya DefinityOne Media Servers
Avaya IP600 Media Servers
Avaya S3400 Message Application Server
Avaya S8100 Media Servers
Microsoft Windows 2000 Advanced Server SP1, SP2, SP3, SP4
Microsoft Windows 2000 Datacenter Server SP1, SP2, SP3, SP4
Microsoft Windows 2000 Professional SP1, SP2, SP3, SP4
Microsoft Windows 2000 Server SP1, SP2, SP3, SP4
Microsoft Windows 98
Microsoft Windows 98SE
Microsoft Windows ME
Microsoft Windows NT Enterprise Server 4.0, 4.0 SP1, 4.0 SP2, 4.0 SP3, 4.0 SP4, 4.0 SP5, 4.0 SP6, 4.0 SP6a
Microsoft Windows NT Server 4.0, 4.0 SP1, 4.0 SP2, 4.0 SP3, 4.0 SP4, 4.0 SP5, 4.0 SP6, 4.0 SP6a
Microsoft Windows NT Terminal Server 4.0, 4.0 SP1, 4.0 SP2, 4.0 SP3, 4.0 SP4, 4.0 SP5, 4.0 SP6
Microsoft Windows NT Workstation 4.0, 4.0 SP1, 4.0 SP2, 4.0 SP3, 4.0 SP4, 4.0 SP5, 4.0 SP6, 4.0 SP6a
Microsoft Windows Server 2003 Datacenter Edition
Microsoft Windows Server 2003 Datacenter Edition Itanium
Microsoft Windows Server 2003 Enterprise Edition
Microsoft Windows Server 2003 Enterprise Edition Itanium
Microsoft Windows Server 2003 Standard Edition
Microsoft Windows Server 2003 Web Edition
Microsoft Windows XP 64-bit Edition SP1
Microsoft Windows XP 64-bit Edition Version 2003 SP1
Microsoft Windows XP Home SP1
Microsoft Windows XP Media Center Edition
Microsoft Windows XP Professional SP1


Response

It has been alleged that an official patch to address this issue in Microsoft Windows 98 systems is available to customers who possess a current support contract with Microsoft. Customers are advised to contact their relative Microsoft TAM, in order to obtain a relevant patch.
Microsoft has released a security update (MS04-007) to address this issue in affected versions of Microsoft Windows. Users are strongly advised to obtain fixes as soon as possible.
Avaya has released an advisory to address this and another issue. Please see the advisory at the following location for more information:
Avaya Support: Microsoft Security Bulletin MS04-007


Possible False Positives

There are no known false positives associated with this signature.


Additional References