FIX: Access violation when you use the ICryptoTransform.TransformFinalBlock API to perform a cryptographic operation in a .NET Framework 3.5-based application

Applies to: .NET Framework 3.5 Service Pack 1Windows 7Windows Server 2008 R2

Symptoms


Consider the following scenario:
  • You create a Microsoft .NET Framework 3.5-based application on a computer that is running Windows 7 or Windows Server 2008 R2.
  • The application passes a zero-length byte array to the ICryptoTransform.TransformFinalBlock API to perform a cryptographic operation. For example, you use the API to encrypt or decrypt data.
In this scenario, the application crashes. Additionally, an error message that resembles the following is logged in the event log:

Source: .NET Runtime
Event ID: 1023
Event Data: .NET Runtime version '<2.0.50727.xxxx>' - Fatal Execution Engine Error ('<000007FEFxxxxxxx>') (80131506)

Cause


This issue occurs because the ICryptoTransform.TransformFinalBlock API does not handle the zero-length byte array parameter correctly in the .NET Framework 3.5-based application. Therefore, this results in an unhandled Access Violation exception, which causes the application to crash.

Resolution


Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website: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.

Prerequisites

To apply this hotfix, you must have the .NET Framework 3.5 Service Pack 1 (SP1) installed on a computer that is running one of the following operating systems:
  • Windows 7 Service Pack 1 (SP1)
  • Windows Server 2008 R2 Service Pack 1 (SP1)

Restart requirement

You do not have to restart the computer after you apply this hotfix if .NET Framework-related files are not being used.

File information

The global 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 item in Control Panel.

For all supported x86-based versions of Windows 7 SP1
File nameFile versionFile sizeDateTimePlatform
Big5.nlpNot Applicable66,72812-Nov-201023:43Not Applicable
Bopomofo.nlpNot Applicable82,17212-Nov-201023:43Not Applicable
Ksc.nlpNot Applicable116,75612-Nov-201023:45Not Applicable
Mscorlib.dll2.0.50727.57194,550,65607-Feb-201223:33x86
Normidna.nlpNot Applicable59,34212-Nov-201023:45Not Applicable
Normnfc.nlpNot Applicable45,79412-Nov-201023:45Not Applicable
Normnfd.nlpNot Applicable39,28412-Nov-201023:45Not Applicable
Normnfkc.nlpNot Applicable66,38412-Nov-201023:45Not Applicable
Normnfkd.nlpNot Applicable60,29412-Nov-201023:45Not Applicable
Prc.nlpNot Applicable83,74812-Nov-201023:45Not Applicable
Prcp.nlpNot Applicable83,74812-Nov-201023:45Not Applicable
Sortkey.nlpNot Applicable262,14812-Nov-201023:45Not Applicable
Sorttbls.nlpNot Applicable20,32012-Nov-201023:45Not Applicable
Xjis.nlpNot Applicable28,28812-Nov-201023:45Not Applicable
Mscordacwks.dll2.0.50727.5719990,48007-Feb-201223:33x86
Mscorwks.dll2.0.50727.57195,925,64807-Feb-201223:33x86
Sos.dll2.0.50727.5719389,88807-Feb-201223:34x86
For all supported x64-based versions of Windows 7 SP1 and of Windows Server 2008 R2 SP1

File nameFile versionFile sizeDateTimePlatform
Big5.nlpNot Applicable66,72812-Nov-201023:43Not Applicable
Bopomofo.nlpNot Applicable82,17212-Nov-201023:43Not Applicable
Ksc.nlpNot Applicable116,75612-Nov-201023:44Not Applicable
Mscorlib.dll2.0.50727.57194,567,04007-Feb-201223:32x64
Normidna.nlpNot Applicable59,34212-Nov-201023:44Not Applicable
Normnfc.nlpNot Applicable45,79412-Nov-201023:44Not Applicable
Normnfd.nlpNot Applicable39,28412-Nov-201023:44Not Applicable
Normnfkc.nlpNot Applicable66,38412-Nov-201023:44Not Applicable
Normnfkd.nlpNot Applicable60,29412-Nov-201023:44Not Applicable
Prc.nlpNot Applicable83,74812-Nov-201023:44Not Applicable
Prcp.nlpNot Applicable83,74812-Nov-201023:44Not Applicable
Sortkey.nlpNot Applicable262,14812-Nov-201023:44Not Applicable
Sorttbls.nlpNot Applicable20,32012-Nov-201023:44Not Applicable
Xjis.nlpNot Applicable28,28812-Nov-201023:44Not Applicable
Mscordacwks.dll2.0.50727.57191,756,43207-Feb-201223:32x64
Mscorwks.dll2.0.50727.57199,991,95207-Feb-201223:32x64
Sos.dll2.0.50727.5719486,14407-Feb-201223:32x64
Big5.nlpNot Applicable66,72812-Nov-201023:43Not Applicable
Bopomofo.nlpNot Applicable82,17212-Nov-201023:43Not Applicable
Ksc.nlpNot Applicable116,75612-Nov-201023:45Not Applicable
Mscorlib.dll2.0.50727.57194,550,65607-Feb-201223:33x86
Normidna.nlpNot Applicable59,34212-Nov-201023:45Not Applicable
Normnfc.nlpNot Applicable45,79412-Nov-201023:45Not Applicable
Normnfd.nlpNot Applicable39,28412-Nov-201023:45Not Applicable
Normnfkc.nlpNot Applicable66,38412-Nov-201023:45Not Applicable
Normnfkd.nlpNot Applicable60,29412-Nov-201023:45Not Applicable
Prc.nlpNot Applicable83,74812-Nov-201023:45Not Applicable
Prcp.nlpNot Applicable83,74812-Nov-201023:45Not Applicable
Sortkey.nlpNot Applicable262,14812-Nov-201023:45Not Applicable
Sorttbls.nlpNot Applicable20,32012-Nov-201023:45Not Applicable
Xjis.nlpNot Applicable28,28812-Nov-201023:45Not Applicable
Mscordacwks.dll2.0.50727.5719990,48007-Feb-201223:33x86
Mscorwks.dll2.0.50727.57195,925,64807-Feb-201223:33x86
Sos.dll2.0.50727.5719389,88807-Feb-201223:34x86
For all supported Itanium-based versions of Windows 7 SP1 and of Windows Server 2008 R2 SP1
File nameFile versionFile sizeDateTimePlatform
Big5.nlpNot Applicable66,72812-Nov-201023:45Not Applicable
Bopomofo.nlpNot Applicable82,17212-Nov-201023:45Not Applicable
Ksc.nlpNot Applicable116,75612-Nov-201023:45Not Applicable
Mscorlib.dll2.0.50727.57194,009,98407-Feb-201223:25IA-64
Normidna.nlpNot Applicable59,34212-Nov-201023:45Not Applicable
Normnfc.nlpNot Applicable45,79412-Nov-201023:45Not Applicable
Normnfd.nlpNot Applicable39,28412-Nov-201023:45Not Applicable
Normnfkc.nlpNot Applicable66,38412-Nov-201023:45Not Applicable
Normnfkd.nlpNot Applicable60,29412-Nov-201023:45Not Applicable
Prc.nlpNot Applicable83,74812-Nov-201023:45Not Applicable
Prcp.nlpNot Applicable83,74812-Nov-201023:45Not Applicable
Sortkey.nlpNot Applicable262,14812-Nov-201023:45Not Applicable
Sorttbls.nlpNot Applicable20,32012-Nov-201023:45Not Applicable
Xjis.nlpNot Applicable28,28812-Nov-201023:46Not Applicable
Mscordacwks.dll2.0.50727.57193,083,53607-Feb-201223:25IA-64
Mscorwks.dll2.0.50727.571920,343,56807-Feb-201223:25IA-64
Sos.dll2.0.50727.5719873,72807-Feb-201223:25IA-64
Big5.nlpNot Applicable66,72812-Nov-201023:43Not Applicable
Bopomofo.nlpNot Applicable82,17212-Nov-201023:43Not Applicable
Ksc.nlpNot Applicable116,75612-Nov-201023:45Not Applicable
Mscorlib.dll2.0.50727.57194,550,65607-Feb-201223:33x86
Normidna.nlpNot Applicable59,34212-Nov-201023:45Not Applicable
Normnfc.nlpNot Applicable45,79412-Nov-201023:45Not Applicable
Normnfd.nlpNot Applicable39,28412-Nov-201023:45Not Applicable
Normnfkc.nlpNot Applicable66,38412-Nov-201023:45Not Applicable
Normnfkd.nlpNot Applicable60,29412-Nov-201023:45Not Applicable
Prc.nlpNot Applicable83,74812-Nov-201023:45Not Applicable
Prcp.nlpNot Applicable83,74812-Nov-201023:45Not Applicable
Sortkey.nlpNot Applicable262,14812-Nov-201023:45Not Applicable
Sorttbls.nlpNot Applicable20,32012-Nov-201023:45Not Applicable
Xjis.nlpNot Applicable28,28812-Nov-201023:45Not Applicable
Mscordacwks.dll2.0.50727.5719990,48007-Feb-201223:33x86
Mscorwks.dll2.0.50727.57195,925,64807-Feb-201223:33x86
Sos.dll2.0.50727.5719389,88807-Feb-201223:34x86

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References


For more information about the ICryptoTransform interface, visit the following MSDN website: