Microsoft Security Bulletin MS15-058 - Important

Vulnerabilities in SQL Server Could Allow Remote Code Execution (3065718)

Published: July 14, 2015 | Updated: December 9, 2015

Version: 1.2

Executive Summary

This security update resolves vulnerabilities in Microsoft SQL Server. The most severe vulnerabilities could allow remote code execution if an authenticated attacker runs a specially crafted query that is designed to execute a virtual function from a wrong address, leading to a function call to uninitialized memory. To exploit this vulnerability an attacker would need permissions to create or modify a database.

This security update is rated Important for supported editions of Microsoft SQL Server 2008, Microsoft SQL Server 2008 R2, Microsoft SQL Server 2012, and Microsoft SQL Server 2014. For more information, see the Affected Software section.

The security update addresses the vulnerabilities by correcting how SQL Server handles internal function calls and pointer casting. For more information about the vulnerabilities, see the Vulnerability Information section.

For more information about this update, see Microsoft Knowledge Base Article 3065718.

Affected Software

The following software has been tested to determine which versions or editions are affected. Other versions or editions are either past their support life cycle or are not affected. To determine the support life cycle for your software version or edition, see Microsoft Support Lifecycle.

Affected Software 

GDR Software Updates QFE Software Updates Maximum Security Impact Aggregate Severity Rating Updates Replaced
SQL Server 2008 Service Pack 3
Microsoft SQL Server 2008 for 32-bit Systems Service Pack 3 (3045305) Microsoft SQL Server 2008 for 32-bit Systems Service Pack 3 (3045303) Remote Code Execution Important None
Microsoft SQL Server 2008 for x64-based Systems Service Pack 3 (3045305) Microsoft SQL Server 2008 for x64-based Systems Service Pack 3 (3045303) Remote Code Execution Important None
Microsoft SQL Server 2008 for Itanium-based Systems Service Pack 3 (3045305) Microsoft SQL Server 2008 for Itanium-based Systems Service Pack 3 (3045303) Remote Code Execution Important None
SQL Server 2008 Service Pack 4
Microsoft SQL Server 2008 for 32-bit Systems Service Pack 4 (3045311) Microsoft SQL Server 2008 for 32-bit Systems Service Pack 4 (3045308) Remote Code Execution Important None
Microsoft SQL Server 2008 for x64-based Systems Service Pack 4 (3045311) Microsoft SQL Server 2008 for x64-based Systems Service Pack 4 (3045308) Remote Code Execution Important None
SQL Server 2008 R2 Service Pack 2
Microsoft SQL Server 2008 R2 for 32-bit Systems Service Pack 2 (3045313) Microsoft SQL Server 2008 R2 for 32-bit Systems Service Pack 2 (3045312) Remote Code Execution Important None
Microsoft SQL Server 2008 R2 for x64-based Systems Service Pack 2 (3045313) Microsoft SQL Server 2008 R2 for x64-based Systems Service Pack 2 (3045312) Remote Code Execution Important None
Microsoft SQL Server 2008 R2 for Itanium-based Systems Service Pack 2 (3045313) Microsoft SQL Server 2008 R2 for Itanium-based Systems Service Pack 2 (3045312) Remote Code Execution Important None
SQL Server 2008 R2 Service Pack 3
Microsoft SQL Server 2008 R2 for 32-bit Systems Service Pack 3 (3045316) Microsoft SQL Server 2008 R2 for 32-bit Systems Service Pack 3 (3045314) Remote Code Execution Important None
Microsoft SQL Server 2008 R2 for x64-based Systems Service Pack 3 (3045316) Microsoft SQL Server 2008 R2 for x64-based Systems Service Pack 3 (3045314) Remote Code Execution Important None
SQL Server 2012 Service Pack 1
Microsoft SQL Server 2012 for 32-bit Systems Service Pack 1 (3045318) Microsoft SQL Server 2012 for 32-bit Systems Service Pack 1 (3045317) Remote Code Execution Important None
Microsoft SQL Server 2012 for x64-based Systems Service Pack 1 (3045318) Microsoft SQL Server 2012 for x64-based Systems Service Pack 1 (3045317) Remote Code Execution Important None
SQL Server 2012 Service Pack 2
Microsoft SQL Server 2012 for 32-bit Systems Service Pack 2 (3045321) Microsoft SQL Server 2012 for 32-bit Systems Service Pack 2 (3045319) Remote Code Execution Important None
Microsoft SQL Server 2012 for x64-based Systems Service Pack 2 (3045321) Microsoft SQL Server 2012 for x64-based Systems Service Pack 2 (3045319) Remote Code Execution Important None
SQL Server 2014
Microsoft SQL Server 2014 for 32-bit Systems (3045324) Microsoft SQL Server 2014 for 32-bit Systems (3045323) Remote Code Execution Important None
Microsoft SQL Server 2014 for x64-based Systems (3045324) Microsoft SQL Server 2014 for x64-based Systems (3045323) Remote Code Execution Important None

Update FAQ

There are GDR and/or QFE updates offered for my version of SQL Server. How do I know which update to use?
First, determine your SQL Server version number. For more information on determining your SQL Server version number, see Microsoft Knowledge Base Article 321185.

Second, in the table below, locate your version number or the version range that your version number falls within. The corresponding update is the one you need to install.

Note If your SQL Server version number is not represented in the table below, your SQL Server version is no longer supported. Please upgrade to the latest Service Pack or SQL Server product in order to apply this and future security updates.

Update number Title Apply if current product version is… This security update also includes servicing releases up through…
3045305 MS15-058: Description of the security update for SQL Server 2008 Service Pack 3 GDR: July 14, 2015 10.00.5500.00 or 10.00.5520.00 2008 SP3 GDR (MS14-044)
3045303 MS15-058: Description of the security update for SQL Server 2008 Service Pack 3 QFE: July 14, 2015 10.00.5750. - 10.00.5869.00 2008 SP3 CU17
3045311 MS15-058: Description of the security update for SQL Server 2008 Service Pack 4 GDR: July 14, 2015 10.0.6000.29 2008 SP4
3045308 MS15-058: Description of the security update for SQL Server 2008 Service Pack 4 QFE: July 14, 2015 10.0.6500.00 - 10.0.6526.0 2008 SP4
3045313 MS15-058: Description of the security update for SQL Server 2008 R2 Service Pack 2 GDR: July 14, 2015 10.50.4000.0 or 10.50.4033.0 2008 R2 SP2 GDR (MS14-044)
3045312 MS15-058: Description of the security update for SQL Server 2008 R2 Service Pack 2 QFE: July 14, 2015 10.50.4251.0 - 10.50.4331.0 2008 R2 SP2 CU13
3045316 MS15-058: Description of the security update for SQL Server 2008 R2 Service Pack 3 GDR: July 14, 2015 10.50.6000.34 2008 R2 SP3
3045314 MS15-058: Description of the security update for SQL Server 2008 R2 Service Pack 3 QFE: July 14, 2015 10.50.6500.0 - 10.50.6525.0 2008 R2 SP3
3045318 MS15-058: Description of the security update for SQL Server 2012 SP1 GDR: July 14, 2015 11.0.3000.0 or 11.0.3153.0 2012 SP1 GDR (MS14-044)
3045317 MS15-058: Description of the security update for SQL Server 2012 SP1 QFE: July 14, 2015 11.0.3300.0 - 11.0.3492.0 2012 SP1 CU16
3045321 MS15-058: Description of the security update for SQL Server 2012 Service Pack 2 GDR: July 14, 2015 11.0.5058.0 2012 SP2
3045319 MS15-058: Description of the security update for SQL Server 2012 Service Pack 2 QFE: July 14, 2015 11.0.5500.0 - 11.0.5592.0 2012 SP2 CU6
3045324 MS15-058: Description of the security update for SQL Server 2014 GDR: July 14, 2015 12.0.2000.8 or 12.0.2254.0 2014 RTM GDR (MS14-044)
3045323 MS15-058: Description of the security update for SQL Server 2014 QFE: July 14, 2015 12.0.2300.0 - 12.0.2546.0 2014 RTM CU8
3070446 MS15-058: Description of the non-security update for SQL Server 2014 Service Pack 1 GDR: July 14, 2015 12.0.4100.1 2014 SP1

Note For the GDR branch, after applying the update you will not see database upgrade script execution. This is the expected behavior since the patch only replaces the binary files.

For additional installation instructions, see the Security Update Information subsection for your SQL Server edition in the Update Information section.

What are the GDR and QFE update designations and how do they differ?
The General Distribution Release (GDR) and Quick Fix Engineering (QFE) designations correspond to the two different update servicing branches in place for SQL Server. The primary difference between the two is that QFE branches cumulatively include all updates while GDR branches include only security updates for a given baseline. A baseline can be the initial RTM release or a Service Pack.

For any given baseline, either the GDR or QFE branch updates are options if you are at the baseline or have installed a previous GDR update for that baseline. The QFE branch is the only option if you have installed a previous QFE for the baseline you are on.

Will these security updates be offered to SQL Server clusters? 
Yes. The updates will also be offered to SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, and SQL Server 2014 instances that are clustered. Updates for SQL Server clusters will require user interaction.

If the SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, or SQL Server 2014 cluster has a passive node, to reduce downtime, Microsoft recommends that you scan and apply the update to the inactive node first, then scan and apply it to the active node. When all components have been updated on all nodes, the update will no longer be offered.

Can the security updates be applied to SQL Server instances on Windows Azure (IaaS)?
Yes. SQL Server instances on Windows Azure (IaaS) can be offered the security updates through Microsoft Update, or customers can download the security updates from Microsoft Download Center and apply them manually.

Does this security update contain any non-security changes to functionality?
Yes. In addition to the security-related changes discussed in the Vulnerability Details section of this bulletin, the security update also includes some important non-security fixes. For more information, see Microsoft Knowledge Base Article 3065718.

I am running Microsoft SQL Server 2014 Service Pack 1, which is not listed as affected software. Why am I being offered an update?
Microsoft SQL Server 2014 Service Pack 1 is not affected by the vulnerabilities discussed in this bulletin, but is subject to an important non-security fix that is being released with this security update. Therefore, customers running the GDR branch of Microsoft SQL Server 2014 Service Pack 1 will be offered non-security update 3070446. For a general description of the non-security update, see Microsoft Knowledge Base Article 3070446. For more information about the non-security fix, see Microsoft Knowledge Base Article 3067257.

Severity Ratings and Vulnerability Identifiers

The following severity ratings assume the potential maximum impact of the vulnerability. For information regarding the likelihood, within 30 days of this security bulletin's release, of the exploitability of the vulnerability in relation to its severity rating and security impact, please see the Exploitability Index in the July bulletin summary.

Vulnerability Severity Rating and Maximum Security Impact by Affected Software
Affected Software SQL Server Elevation of Privilege Vulnerability - CVE-2015-1761 SQL Server Remote Code Execution Vulnerability - CVE-2015-1762 SQL Server Remote Code Execution Vulnerability - CVE-2015-1763 Aggregate Severity Rating
SQL Server 2008 Service Pack 3
Microsoft SQL Server 2008 for 32-bit Systems Service Pack 3 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
Microsoft SQL Server 2008 for x64-based Systems Service Pack 3 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
Microsoft SQL Server 2008 for Itanium-based Systems Service Pack 3 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
SQL Server 2008 Service Pack 4
Microsoft SQL Server 2008 for 32-bit Systems Service Pack 4 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
Microsoft SQL Server 2008 for x64-based Systems Service Pack 4 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
SQL Server 2008 R2 Service Pack 2
Microsoft SQL Server 2008 R2 for 32-bit Systems Service Pack 2 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
Microsoft SQL Server 2008 R2 for x64-based Systems Service Pack 2 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
Microsoft SQL Server 2008 R2 for Itanium-based Systems Service Pack 2 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
SQL Server 2008 R2 Service Pack 3
Microsoft SQL Server 2008 R2 for 32-bit Systems Service Pack 3 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
Microsoft SQL Server 2008 R2 for x64-based Systems Service Pack 3 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
SQL Server 2012 Service Pack 1
Microsoft SQL Server 2012 for 32-bit Systems Service Pack 1 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
Microsoft SQL Server 2012 for x64-based Systems Service Pack 1 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
SQL Server 2012 Service Pack 2
Microsoft SQL Server 2012 for 32-bit Systems Service Pack 2 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
Microsoft SQL Server 2012 for x64-based Systems Service Pack 2 Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
SQL Server 2014
Microsoft SQL Server 2014 for 32-bit Systems Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important
Microsoft SQL Server 2014 for x64-based Systems Important  Elevation of Privilege Important  Remote Code Execution Important  Remote Code Execution Important

Vulnerability Information

SQL Server Elevation of Privilege Vulnerability - CVE-2015-1761

An elevation of privilege vulnerability exists in Microsoft SQL Server when it improperly casts pointers to an incorrect class. An attacker could exploit the vulnerability if their credentials allow access to an affected SQL server database. An attacker who successfully exploited this vulnerability could gain elevated privileges that could be used to view, change, or delete data; or create new accounts.

The security update addresses the vulnerability by correcting how SQL Server handles pointer casting.

Microsoft received information about the vulnerability through coordinated vulnerability disclosure. When this security bulletin was issued, Microsoft had not received any information to indicate that this vulnerability had been publicly used to attack customers.

Mitigating Factors

The following mitigating factors may be helpful in your situation:

  • Requires permissions to create or modify database schema or data
    To exploit this vulnerability an attacker would need permissions to create or modify a database.

Workarounds

The following workarounds may be helpful in your situation:

  • Limit permissions on server for database and schema creation
    Since the vulnerability is exploitable only within the context of very specific database schema, data, and queries, exploitation can be prevented by strictly controlling who has permissions to create databases and schema on the server. Note that the vulnerability is exposed in very specific edge cases; it is extremely difficult to define the schema and query that would expose the vulnerability.

    Additional guidance: In the unlikely event that SQL Server causes an access-violation / data-execution-prevention error during specific query execution, rewrite the query by splitting it into parts and/or adding query hints.

SQL Server Remote Code Execution Vulnerability - CVE-2015-1762

A remote code execution vulnerability exists in Microsoft SQL Server when it incorrectly handles internal function calls to uninitialized memory. An attacker could exploit the vulnerability if a privileged user runs a specially crafted query on an affected SQL server that has special permission settings (such as VIEW SERVER STATE) turned on. An attacker who successfully exploited this vulnerability could take complete control of an affected system. An attacker could then install programs; view, change, or delete data; or create new accounts.

The security update addresses the vulnerability by correcting how SQL Server handles internal function calls to uninitialized memory.

Microsoft received information about the vulnerability through coordinated vulnerability disclosure. When this security bulletin was issued, Microsoft had not received any information to indicate that this vulnerability had been publicly used to attack customers.

Mitigating Factors

The following mitigating factors may be helpful in your situation:

  • Requires specific configuration
    To exploit this vulnerability transactional replication must be enabled and the attacker must have special permission settings (such as VIEW SERVER STATE) turned on.

Workarounds

Microsoft has not identified any workarounds for this vulnerability.

SQL Server Remote Code Execution Vulnerability - CVE-2015-1763

An authenticated remote code execution vulnerability exists in Microsoft SQL Server when it incorrectly handles internal function calls to uninitialized memory. An attacker could exploit the vulnerability if a privileged user runs a specially crafted query that is designed to execute a virtual function from a wrong address, leading to a function call to uninitialized memory. An attacker who successfully exploited this vulnerability could take complete control of an affected system. An attacker could then install programs; view, change, or delete data; or create new accounts.

The security update addresses the vulnerability by correcting how SQL Server handles internal function calls to uninitialized memory.

Microsoft received information about the vulnerability through coordinated vulnerability disclosure. When this security bulletin was issued, Microsoft had not received any information to indicate that this vulnerability had been publicly used to attack customers.

Mitigating Factors

Microsoft has not identified any mitigating factors for this vulnerability.

Workarounds

The following workarounds may be helpful in your situation:

  • Limit permissions on server for database and schema creation
    Since the vulnerability is exploitable only within the context of very specific database schema, data, and queries, exploitation can be prevented by strictly controlling who has permissions to create databases and schema on the server. Note that the vulnerability is exposed in very specific edge cases; it is extremely difficult to define the schema and query that would expose the vulnerability.

    Additional guidance: In the unlikely event that SQL Server causes an access-violation / data-execution-prevention error during specific query execution, rewrite the query by splitting it into parts and/or adding query hints.

Security Update Deployment

For Security Update Deployment information, see the Microsoft Knowledge Base article referenced in the Executive Summary.

Acknowledgments

Microsoft recognizes the efforts of those in the security community who help us protect customers through coordinated vulnerability disclosure. See Acknowledgments for more information.

Disclaimer

The information provided in the Microsoft Knowledge Base is provided "as is" without warranty of any kind. Microsoft disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Microsoft Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Microsoft Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.

Revisions

  • V1.0 (July 14, 2015): Bulletin published.
  • V1.1 (July 22, 2015): Bulletin revised to improve the Update FAQ section to help customers more easily identify the correct update to apply based on a currently installed version of SQL Server. This is an informational change only. Customers who have already successfully installed the update do not need to take any action.
  • V1.2 (December 9, 2015): Bulletin revised to clarify the product version guidance in the Update FAQ section by aligning it with the guidance provided in earlier releases. This is an informational change only. Customers who have already successfully installed the update do not need to take any action.

Page generated 2015-12-09 11:11Z-08:00.