KB4072698: Windows Server and Azure Stack HCI guidance to protect against silicon-based microarchitectural and speculative execution side-channel vulnerabilities

Ισχύει για
Azure Local Windows Server 2022 Windows Server 2019 Windows Server 2016 Windows Server 2012 R2 Windows Server 2012
Change log
Change date Decription of change
April 20, 2023
  • Added MMIO registry information
August 8, 2023
  • Removed content about CVE-2022-23816 as the CVE number is unused
  • Added "Branch Type Confusion" under the "Vulnerabilities" section
  • Added more information to the "CVE-2022-23825 | AMD CPU Branch Type Confusion (BTC)" registry section
August 9, 2023
  • Updated the "CVE-2022-23825 | AMD CPU Branch Type Confusion (BTC)" registry section
  • Added "CVE-2023-20569 | AMD CPU Return Address Predictor" to "Summary" section
  • Added the "CVE-2023-20569 | AMD CPU Return Address Predictor" registry section
April 9, 2024
  • Added CVE-2022-0001 | Intel Branch History Injection
April 16, 2024
  • Added the "Enabling multiple mitigations" section

Summary

This article provides guidance for a new class of silicon-based microarchitectural and speculative execution side-channel vulnerabilities that affect many modern processors and operating systems. This includes Intel, AMD, and ARM. Specific details for these silicon-based vulnerabilities can be found in the following ADVs (Security Advisories) and CVEs (Common Vulnerabilities and Exposures):

Important

These issues also affects other operating systems, such as Android, Chrome, iOS, and MacOS. We advise customers to seek guidance from those vendors.

We have released several updates to help mitigate these vulnerabilities. We have also taken action to secure our cloud services. See the following sections for more details.

We have not yet received any information to indicate that these vulnerabilities were used to attack customers. We are working closely with industry partners including chip makers, hardware OEMs, and application vendors to protect customers. To get all available protections, firmware (microcode) and software updates are required. This includes microcode from device OEMs and, in some cases, updates to antivirus software.

Vulnerabilities

Speculative execution

This article addresses the following speculative execution vulnerabilities:

Windows Update will also provide Internet Explorer and Edge mitigations. We will continue to improve these mitigations against this class of vulnerabilities.

To learn more about this class of vulnerabilities, see

Microarchitectural Data Sampling vulnerability

On May 14, 2019, Intel published information about a new subclass of speculative execution side-channel vulnerabilities known as Microarchitectural Data Sampling and documented in ADV190013 | Microarchitectural Data Sampling. They have been assigned the following CVEs:

Important

These issues will affect other systems such as Android, Chrome, iOS, and MacOS. We advise customers to seek guidance from those vendors.

Microsoft has released updates to help mitigate these vulnerabilities. To get all available protections, firmware (microcode) and software updates are required. This may include microcode from device OEMs. In some cases, installing these updates will have a performance impact. We have also acted to secure our cloud services. We strongly recommend deploying these updates.

For more information about this issue, see the following Security Advisory and use scenario-based guidance to determine actions necessary to mitigate the threat:

Note

We recommend that you install all the latest updates from Windows Update before you install any microcode updates.

Spectre, Variant 1 vulnerability

On August 6, 2019 Intel released details about a Windows kernel information disclosure vulnerability. This vulnerability is a variant of the Spectre, Variant 1 speculative execution side-channel vulnerability and has been assigned CVE-2019-1125.

On July 9, 2019 we released security updates for the Windows operating system to help mitigate this issue. Please note that we held back documenting this mitigation publicly until the coordinated industry disclosure on Tuesday, August 6, 2019.

Customers who have Windows Update enabled and have applied the security updates released on July 9, 2019 are protected automatically. There is no further configuration necessary.

Note

This vulnerability does not require a microcode update from your device manufacturer (OEM).

For more information about this vulnerability and applicable updates, see the Microsoft Security Update Guide:

Transaction Asynchronous Abort vulnerability

On November 12, 2019, Intel published a technical advisory around Intel® Transactional Synchronization Extensions (Intel TSX) Transaction Asynchronous Abort vulnerability that is assigned CVE-2019-11135. Microsoft has released updates to help mitigate this vulnerability and the OS protections are enabled by default for Windows Server 2019 but disabled by default for Windows Server 2016 and earlier Windows Server OS editions.

MMIO Stale Data Sampling vulnerability

On June 14 2022, we published ADV220002 | Microsoft Guidance on Intel Processor MMIO Stale Data Vulnerabilities and assigned these CVEs:

Recommended actions

You should take the following actions to help protect against the vulnerabilities:

  1. Apply all available Windows operating system updates, including the monthly Windows security updates.
  2. Apply the applicable firmware (microcode) update that is provided by the device manufacturer.
  3. Evaluate the risk to your environment based on the information that is provided on Microsoft Security Advisories: ADV180002, ADV180012, ADV190013, and ADV220002, in addition to the information provided in this knowledge base article.
  4. Take action as required by using the advisories and registry key information that are provided in this knowledge base article.

Note

Surface customers will receive a microcode update through Windows Update. For a list of the latest Surface device firmware (microcode) updates, see KB4073065.

Branch Type Confusion

On July 12, 2022, we published CVE-2022-23825 | AMD CPU Branch Type Confusion which describes that aliases in the branch predictor may cause certain AMD processors to predict the wrong branch type. This issue might potentially lead to information disclosure.

To help protect against this vulnerability, we recommend installing Windows updates that are dated on or after July 2022 and then take action as required by CVE-2022-23825 and registry key information that is provided in this knowledge base article.

For more information, see the AMD-SB-1037 security bulletin.

Return Address Predictor

On August 8, 2023, we published CVE-2023-20569 | Return Address Predictor (also known as Inception) which describes a new speculative side channel attack that can result in speculative execution at an attacker-controlled address. This issue affects certain AMD processors and might potentially lead to information disclosure.

To help protect against this vulnerability, we recommend installing Windows updates that are dated on or after August 2023 and then take action as required by CVE-2023-20569 and registry key information that is provided in this knowledge base article.

For more information, see the AMD-SB-7005 security bulletin.

Branch History Injection

On April 9, 2024 we published CVE-2022-0001 | Intel Branch History Injection which describes Branch History Injection (BHI) which is a specific form of intra-mode BTI. This vulnerability occurs when an attacker may manipulate branch history before transitioning from user to supervisor mode (or from VMX non-root/guest to root mode). This manipulation could cause an indirect branch predictor to select a specific predictor entry for an indirect branch, and a disclosure gadget at the predicted target will transiently execute. This may be possible because the relevant branch history may contain branches taken in previous security contexts, and in particular, other predictor modes.

Mitigation settings for Windows Server and Azure Stack HCI

Security advisories (ADVs) and CVEs provide information provide information about the risk that is posed by these vulnerabilities. They also help you identify the vulnerabilities and identify the default state of mitigations for Windows Server systems. The below table summarizes the requirement of CPU microcode and the default status of the mitigations on Windows Server.

CVE Requires CPU microcode/firmware? Mitigation Default status
CVE-2017-5753 No Enabled by default (no option to disable)
Please refer to ADV180002 for additional information
CVE-2017-5715 Yes Disabled by default.
Please refer to ADV180002 for additional information and this KB article for applicable registry key settings.
Note “Retpoline” is enabled by default for devices running Windows 10, version 1809 and later if Spectre Variant 2 (CVE-2017-5715) is enabled. For more information about “Retpoline”, follow Mitigating Spectre variant 2 with Retpoline on Windows blog post.
CVE-2017-5754 No Windows Server 2019, Windows Server 2022, and Azure Stack HCI: Enabled by default.
Windows Server 2016 and earlier: Disabled by default.
Please refer to ADV180002 for additional information.
CVE-2018-3639 Intel: Yes
AMD: No
Disabled by default. See ADV180012 for more information and this article for applicable registry key settings.
CVE-2018-11091 Intel: Yes Windows Server 2019, Windows Server 2022, and Azure Stack HCI: Enabled by default.
Windows Server 2016 and earlier: Disabled by default.
See ADV190013 for more information and this article for applicable registry key settings.
CVE-2018-12126 Intel: Yes Windows Server 2019, Windows Server 2022, and Azure Stack HCI: Enabled by default.
Windows Server 2016 and earlier: Disabled by default.
See ADV190013 for more information and this article for applicable registry key settings.
CVE-2018-12127 Intel: Yes Windows Server 2019, Windows Server 2022, and Azure Stack HCI: Enabled by default.
Windows Server 2016 and earlier: Disabled by default.
See ADV190013 for more information and this article for applicable registry key settings.
CVE-2018-12130 Intel: Yes Windows Server 2019, Windows Server 2022, and Azure Stack HCI: Enabled by default.
Windows Server 2016 and earlier: Disabled by default.
See ADV190013 for more information and this article for applicable registry key settings.
CVE-2019-11135 Intel: Yes Windows Server 2019, Windows Server 2022, and Azure Stack HCI: Enabled by default.
Windows Server 2016 and earlier: Disabled by default.
See CVE-2019-11135 for more information and this article for applicable registry key settings.
CVE-2022-21123 (part of MMIO ADV220002) Intel: Yes Windows Server 2019, Windows Server 2022, and Azure Stack HCI: Enabled by default.
Windows Server 2016 and earlier: Disabled by default.*
See CVE-2022-21123 for more information and this article for applicable registry key settings.
CVE-2022-21125 (part of MMIO ADV220002) Intel: Yes Windows Server 2019, Windows Server 2022, and Azure Stack HCI: Enabled by default.
Windows Server 2016 and earlier: Disabled by default.*
See CVE-2022-21125 for more information and this article for applicable registry key settings.
CVE-2022-21127 (part of MMIO ADV220002) Intel: Yes Windows Server 2019, Windows Server 2022, and Azure Stack HCI: Enabled by default.
Windows Server 2016 and earlier: Disabled by default.*
See CVE-2022-21127 for more information and this article for applicable registry key settings.
CVE-2022-21166 (part of MMIO ADV220002) Intel: Yes Windows Server 2019, Windows Server 2022, and Azure Stack HCI: Enabled by default.
Windows Server 2016 and earlier: Disabled by default.*
See CVE-2022-21166 for more information and this article for applicable registry key settings.
CVE-2022-23825 (AMD CPU Branch Type Confusion) AMD: No See CVE-2022-23825 for more information and this article for applicable registry key settings.
CVE-2023-20569
(AMD CPU Return Address Predictor)
AMD: Yes See CVE-2023-20569 for more information and this article for applicable registry key settings.
CVE-2022-0001 Intel: No Disabled by default
See CVE-2022-0001 for more information and this article for applicable registry key settings.

Note

* Follow mitigation guidance for Meltdown below.

If you want to obtain all available protections against these vulnerabilities, you must make registry key changes to enable these mitigations that are disabled by default.

Enabling these mitigations may affect performance. The scale of the performance effects depends on multiple factors, such as the specific chipset in your physical host and the workloads that are running. We recommend that you assess the performance effects for your environment and make any necessary adjustments.

Your server is at increased risk if it's in one of the following categories:

  • Hyper-V hosts: Requires protection for VM-to-VM and VM-to-host attacks.
  • Remote Desktop Services Hosts (RDSH): Requires protection from one session to another session or from session-to-host attacks.
  • Physical hosts or virtual machines that are running untrusted code, such as containers or untrusted extensions for database, untrusted web content, or workloads that run code that is from external sources. These require protection from untrusted process-to-another-process or untrusted-process-to-kernel attacks.

Use the following registry key settings to enable the mitigations on the server, and restart the device for the changes to take effect.

Note

By default, enabling mitigations that are off may affect performance. The actual performance effect depends on multiple factors, such as the specific chipset in the device and the workloads that are running.

Registry settings

We are providing the following registry information to enable mitigations that are not enabled by default, as documented in Security Advisories (ADVs) and CVEs. Additionally, we provide registry key settings for users who want to disable the mitigations when applicable for Windows clients.

Note

  • IMPORTANT This section, method, or task contains steps that tell you how to change the registry. However, serious problems might occur if you change the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you change it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see the following article in the Microsoft Knowledge Base:
  • KB322756 How to back up and restore the registry in Windows

Manage mitigations for CVE-2017-5715 (Spectre Variant 2), CVE-2017-5754 (Meltdown), and CVE-2022-21123, CVE-2022-21125, CVE-2022-21127, CVE-2022-21166 (MMIO)

Note

  • IMPORTANT By default, Retpoline is configured as follows if Spectre, Variant 2 mitigation (CVE-2017-5715) is enabled:
    • Retpoline mitigation is enabled on Windows 10, version 1809 and later Windows versions.
    • Retpoline mitigation is disabled on Windows Server 2019 and later Windows Server versions.
  • For more information about the configuration of Retpoline, see Mitigating Spectre variant 2 with Retpoline on Windows.
  • To enable mitigations for CVE-2017-5715 (Spectre Variant 2), CVE-2017-5754 (Meltdown), and CVE-2022-21123, CVE-2022-21125, CVE-2022-21127, CVE-2022-21166 (MMIO)
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 0 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
    If the Hyper-V feature is installed, add the following registry setting:
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization" /v MinVmVersionForCpuBasedMitigations /t REG_SZ /d "1.0" /f
    If this is a Hyper-V host and the firmware updates have been applied: Fully shut down all Virtual Machines. This enables the firmware-related mitigation to be applied on the host before the VMs are started. Therefore, the VMs are also updated when they're restarted.
    Restart the device for the changes to take effect.
  • To disable mitigations for CVE-2017-5715 (Spectre Variant 2), CVE-2017-5754 (Meltdown), and CVE-2022-21123, CVE-2022-21125, CVE-2022-21127, CVE-2022-21166 (MMIO)
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 3 /f
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
    Restart the device for the changes to take effect.

Note

Setting FeatureSettingsOverrideMask to 3 is accurate for both the "enable" and "disable" settings. (See the "FAQ " section for more details about registry keys.)

Manage the mitigation for CVE-2017-5715 (Spectre Variant 2)
To disable Variant 2: (CVE-2017-5715 | Branch Target Injection) mitigation:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
Restart the device for the changes to take effect.
To enable Variant 2: (CVE-2017-5715 | Branch Target Injection) mitigation:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 0 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
Restart the device for the changes to take effect.
AMD processors only: Enable the full mitigation for CVE-2017-5715 (Spectre Variant 2)

By default, user-to-kernel protection for CVE-2017-5715 is disabled for AMD CPUs. Customers must enable the mitigation to receive additional protections for CVE-2017-5715.  For more information, see FAQ #15 in ADV180002.

Enable user-to-kernel protection on AMD processors along with other protections for CVE 2017-5715:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 64 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
If the Hyper-V feature is installed, add the following registry setting:
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization" /v MinVmVersionForCpuBasedMitigations /t REG_SZ /d "1.0" /f
If this is a Hyper-V host and the firmware updates have been applied: Fully shut down all Virtual Machines. This enables the firmware-related mitigation to be applied on the host before the VMs are started. Therefore, the VMs are also updated when they're restarted.
Restart the device for the changes to take effect.
Manage mitigations for CVE-2018-3639 (Speculative Store Bypass), CVE-2017-5715 (Spectre Variant 2), and CVE-2017-5754 (Meltdown)
To enable mitigations for CVE-2018-3639 (Speculative Store Bypass), CVE-2017-5715 (Spectre Variant 2), and CVE-2017-5754 (Meltdown):
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 8 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
If the Hyper-V feature is installed, add the following registry setting:
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization" /v MinVmVersionForCpuBasedMitigations /t REG_SZ /d "1.0" /f
If this is a Hyper-V host and the firmware updates have been applied: Fully shut down all Virtual Machines. This enables the firmware-related mitigation to be applied on the host before the VMs are started. Therefore, the VMs are also updated when they're restarted.
Restart the device for the changes to take effect.
To disable mitigations for CVE-2018-3639 (Speculative Store Bypass) AND mitigations for CVE-2017-5715 (Spectre Variant 2) and CVE-2017-5754 (Meltdown)
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 3 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
Restart the device for the changes to take effect.
AMD processors only: Enable the full mitigation for CVE-2017-5715 (Spectre Variant 2) and CVE 2018-3639 (Speculative Store Bypass)

By default, user-to-kernel protection for CVE-2017-5715 is disabled for AMD processors. Customers must enable the mitigation to receive additional protections for CVE-2017-5715.  For more information, see FAQ #15 in ADV180002.

Enable user-to-kernel protection on AMD processors along with other protections for CVE 2017-5715 and protections for CVE-2018-3639 (Speculative Store Bypass):
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 72 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
If the Hyper-V feature is installed, add the following registry setting:
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization" /v MinVmVersionForCpuBasedMitigations /t REG_SZ /d "1.0" /f
If this is a Hyper-V host and the firmware updates have been applied: Fully shut down all Virtual Machines. This enables the firmware-related mitigation to be applied on the host before the VMs are started. Therefore, the VMs are also updated when they're restarted.
Restart the device for the changes to take effect.
Manage Transaction Asynchronous Abort vulnerability, Microarchitectural Data Sampling, Spectre, Meltdown, MMIO, Speculative Store Bypass Disable (SSBD), and L1 Terminal Fault (L1TF)
To enable mitigations for Intel Transactional Synchronization Extensions (Intel TSX) Transaction Asynchronous Abort vulnerability (CVE-2019-11135) and Microarchitectural Data Sampling ( CVE-2018-11091 , CVE-2018-12126 , CVE-2018-12127 , CVE-2018-12130 ) along with Spectre [CVE-2017-5753 & CVE-2017-5715], Meltdown [CVE-2017-5754] variants, MMIO (CVE-2022-21123, CVE-2022-21125, CVE-2022-21127, and CVE-2022-21166) including Speculative Store Bypass Disable (SSBD) [CVE-2018-3639 ] as well as L1 Terminal Fault (L1TF) [CVE-2018-3615, CVE-2018-3620, and CVE-2018-3646] without disabling Hyper-Threading:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 72 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
If the Hyper-V feature is installed, add the following registry setting:
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization" /v MinVmVersionForCpuBasedMitigations /t REG_SZ /d "1.0" /f
If this is a Hyper-V host and the firmware updates have been applied: Fully shut down all Virtual Machines. This enables the firmware-related mitigation to be applied on the host before the VMs are started. Therefore, the VMs are also updated when they're restarted.
Restart the device for the changes to take effect.
To enable mitigations for Intel Transactional Synchronization Extensions (Intel TSX) Transaction Asynchronous Abort vulnerability (CVE-2019-11135) and Microarchitectural Data Sampling ( CVE-2018-11091, CVE-2018-12126 , CVE-2018-12127 , CVE-2018-12130) along with Spectre [CVE-2017-5753 & CVE-2017-5715] and Meltdown [CVE-2017-5754] variants, including Speculative Store Bypass Disable (SSBD) [CVE-2018-3639] as well as L1 Terminal Fault (L1TF) [CVE-2018-3615, CVE-2018-3620, and CVE-2018-3646] with Hyper-Threading disabled:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 8264 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
If the Hyper-V feature is installed, add the following registry setting:
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization" /v MinVmVersionForCpuBasedMitigations /t REG_SZ /d "1.0" /f
If this is a Hyper-V host and the firmware updates have been applied: Fully shut down all Virtual Machines. This enables the firmware-related mitigation to be applied on the host before the VMs are started. Therefore, the VMs are also updated when they're restarted.
Restart the device for the changes to take effect.
To disable mitigations for Intel Transactional Synchronization Extensions (Intel TSX) Transaction Asynchronous Abort vulnerability (CVE-2019-11135) and Microarchitectural Data Sampling ( CVE-2018-11091, CVE-2018-12126 , CVE-2018-12127 , CVE-2018-12130) along with Spectre [CVE-2017-5753 & CVE-2017-5715] and Meltdown [CVE-2017-5754] variants, including Speculative Store Bypass Disable (SSBD) [CVE-2018-3639] as well as L1 Terminal Fault (L1TF) [CVE-2018-3615, CVE-2018-3620, and CVE-2018-3646]:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 3 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
Restart the device for the changes to take effect.
CVE-2022-23825 \| AMD CPU Branch Type Confusion (BTC)

To enable the mitigation for CVE-2022-23825 on AMD processors:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 16777280 /f

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f

To be fully protected, customers might also need to disable Hyper-Threading (also known as Simultaneous Multi Threading (SMT)). Please see KB4073757 for guidance on protecting Windows devices.

CVE-2023-20569 \| AMD CPU Return Address Predictor

To enable the mitigation for CVE-2023-20569 on AMD processors:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 67108928 /f

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f

CVE-2022-0001 \| Intel Branch History Injection

To enable the mitigation for CVE-2022-0001 on Intel processors:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 0x00800000 /f

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 0x00000003 /f

Enabling multiple mitigations

To enable multiple mitigations, you must add the REG_DWORD value of each mitigation together.

For example:


Mitigation for Transaction Asynchronous Abort vulnerability, Microarchitectural Data Sampling, Spectre, Meltdown, MMIO, Speculative Store Bypass Disable (SSBD), and L1 Terminal Fault (L1TF) with Hyper-Threading disabled reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 8264 /f
NOTE 8264 (in Decimal) = 0x2048 (in Hex)
To enable BHI along with other existing settings, you will need to use bitwise OR of current value with 8,388,608 (0x800000).
0x800000 OR 0x2048(8264 in decimal) and it will become 8,396,872(0x802048). Same with FeatureSettingsOverrideMask.
Mitigation for CVE-2022-0001 on Intel processors reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 0x00800000 /f
Combined mitigation reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 0x00802048 /f

Verifying that protections are enabled

To help verify that protections are enabled, we have published a PowerShell script that you can run on your devices. Install and run the script by using one of the following methods.

Method 1: PowerShell verification by using the PowerShell Gallery (Windows Server 2016 or WMF 5.0/5.1)
Install the PowerShell Module:
PS> Install-Module SpeculationControl
Run the PowerShell module to verify that protections are enabled:
PS> # Save the current execution policy so it can be reset
PS> $SaveExecutionPolicy = Get-ExecutionPolicy
PS> Set-ExecutionPolicy RemoteSigned -Scope Currentuser
PS> Import-Module SpeculationControl
PS> Get-SpeculationControlSettings
PS> # Reset the execution policy to the original state
PS> Set-ExecutionPolicy $SaveExecutionPolicy -Scope Currentuser
Method 2: PowerShell verification by using a download from Technet (earlier operating system versions and earlier WMF versions)
Install the PowerShell module from Technet ScriptCenter:

  1. Go to https:⁠//aka.ms/SpeculationControlPS .
  2. Download SpeculationControl.zip to a local folder.
  3. Extract the contents to a local folder. For example: C:\ADV180002
Run the PowerShell module to verify that protections are enabled:

Start PowerShell, and then use the previous example to copy and run the following commands:

PS> # Save the current execution policy so it can be reset

PS> $SaveExecutionPolicy = Get-ExecutionPolicy

PS> Set-ExecutionPolicy RemoteSigned -Scope Currentuser

PS> CD C:\ADV180002\SpeculationControl

PS> Import-Module .\SpeculationControl.psd1

PS> Get-SpeculationControlSettings

PS> # Reset the execution policy to the original state

PS> Set-ExecutionPolicy $SaveExecutionPolicy -Scope Currentuser

For a detailed explanation of the output of the PowerShell script, see KB4074629 .

Frequently asked questions

I wasn't offered the Windows security updates that were released in January and February 2018. What should I do?

To help avoid adversely affecting customer devices, the Windows security updates that were released in January and February 2018 were not offered to all customers. For details, see KB407269 .

How can I tell whether I have the correct version of the CPU microcode?

The microcode is delivered through a firmware update. Consult your OEM about the firmware version that has the appropriate update for your computer.

What are the performance effects of the mitigations?

There are multiple variables that affect performance, ranging from the system version to the workloads that are running. For some systems, the performance effect will be negligible. For others, it will be considerable.

We recommend that you assess the performance effects on your systems and make adjustments as necessary.

I'm running Windows Server in a third-party hosted environment or cloud. What should I do?

In addition to the guidance that's in this article regarding virtual machines, you should contact your service provider to make sure that the hosts that are running your virtual machines are adequately protected.

For Windows Server virtual machines that are running in Azure, see Guidance for mitigating speculative execution side-channel vulnerabilities in Azure . For guidance on using Azure Update Management to mitigate this issue on guest VMs, see KB4077467.

Are there any Windows Server container-specific guidelines?

The updates that were released for Windows Server container images for Windows Server 2016 and Windows 10, version 1709 include the mitigations for this set of vulnerabilities. No additional configuration is required.

Note You must still make sure that the host on which these containers are running is configured to enable the appropriate mitigations.

Do the software and hardware updates have to be installed in a particular order?

No, the installation order doesn't matter.

Will there be multiple restarts?

Yes, you must restart after the firmware (microcode) update and then again after the system update.

Can you provide more details about the registry keys?

Here are the details for the registry keys:

FeatureSettingsOverride represents a bitmap that overrides the default setting and controls which mitigations will be disabled. Bit 0 controls the mitigation that corresponds to CVE-2017-5715. Bit 1 controls the mitigation that corresponds to CVE-2017-5754. The bits are set to 0 to enable the mitigation and to 1 to disable the mitigation.

FeatureSettingsOverrideMask represents a bitmap mask that's used together with FeatureSettingsOverride. In this situation, we use the value 3 (represented as 11 in the binary numeral or base-2 numeral system) to indicate the first two bits that correspond to the available mitigations. This registry key is set to 3 both to enable or to disable the mitigations.

MinVmVersionForCpuBasedMitigations is for Hyper-V hosts. This registry key defines the minimum VM version that's required for you to use the updated firmware capabilities (CVE-2017-5715). Set this to 1.0 to cover all VM versions. Notice that this registry value will be ignored (benign) on non-Hyper-V hosts. For more details, see Protecting guest virtual machines from CVE-2017-5715 (branch target injection).

Can I set the registry keys before I install the update, and then install the update and restart for the changes to take effect?

Yes, there are no side effects if these registry settings are applied prior to installing the January 2018-related fixes.

Can you provide more details about the output of the PowerShell verification script?

See a detailed description of the script output at KB4074629: Understanding SpeculationControl PowerShell script output .

If the firmware (microcode) update is not yet available from my OEM, is there still a way to protect my Hyper-V host?

Yes, for Windows Server 2016 Hyper-V hosts that don't yet have the firmware update available, we have published alternative guidance that can help mitigate the VM to VM or VM to host attacks. See Alternative protections for Windows Server 2016 Hyper-V Hosts against the speculative execution side-channel vulnerabilities .

If I'm on the Security-only branch, what Security-only updates do I need to install to be protect against these vulnerabilities?

Security-only updates are not cumulative. Depending on your operating system version, you may need to install several security updates for full protection. In general, customers will need to install the January, February, March, and April 2018 updates. Systems that have AMD processors need an additional update as shown in the following table:

Operating System version Security Update
Windows 8.1, Windows Server 2012 R2 KB4338815 - Monthly Rollup
KB4338824- Security-only
Windows 7 SP1, Windows Server 2008 R2 SP1, or Windows Server 2008 R2 SP1 (Server Core installation) KB4284826 - Monthly Rollup
KB4284867 - Security Only
Windows Server 2008 SP2 KB4340583 - Security Update

We recommend that you install the Security-only updates in the order of release.

Note

An earlier version of this FAQ incorrectly stated that the February Security-only update included the security fixes that were released in January. In fact, it does not.

If I apply any of the applicable security updates, will they disable the protections for CVE-2017-5715 in the same way that security update KB4078130 did?

No. Security update KB4078130 was a specific fix to prevent unpredictable system behaviors, performance issues, and unexpected restarts after the installation of microcode. Applying the security updates on Windows client operating systems enables all three mitigations. On Windows Server operating systems, you still have to enable the mitigations after you do proper testing. For more information, see KB4072698.

Known issue: Some users may experience network connectivity issues or lose IP address settings after they install the March 13, 2018, Security Update (KB 4088875)

This issue was resolved in KB4093118.

Intel has identified restart issues that involve microcode on some older processors. What should I do?

In February 2018, Intel announced  that they had completed their validations and started to release microcode for newer CPU platforms. Microsoft is making available Intel validated microcode updates that concern Spectre Variant 2 Spectre Variant 2 (CVE-2017-5715 | Branch Target Injection). KB4093836 lists specific knowledge base articles by Windows version. Each specific KB article contains the available Intel microcode updates by CPU.

On January 11, 2018, Intel reported issues in recently released microcode that was meant to address Spectre variant 2 (CVE-2017-5715 | Branch Target Injection). Specifically, Intel noted that this microcode can cause “higher than expected reboots and other unpredictable system behavior” and that these scenarios may cause “data loss or corruption.” Our experience is that system instability can cause data loss or corruption in some circumstances. On January 22, Intel recommended that customers stop deploying the current microcode version on affected processors while Intel performs additional testing on the updated solution. We understand that Intel is continuing to investigate the potential effect of the current microcode version. We encourage customers to review their guidance on an ongoing basis to inform their decisions.

While Intel tests, updates, and deploys new microcode, we are making available an out-of-band (OOB) update, KB4078130, that specifically disables only the mitigation against CVE-2017-5715. In our testing, this update has been found to prevent the described behavior. For the full list of devices, see the microcode revision guidance from Intel. This update covers Windows 7 Service Pack 1 (SP1), Windows 8.1, and all versions of Windows 10, both client and server. If you're running an affected device, this update can be applied by downloading it from the Microsoft Update Catalog website. Application of this payload specifically disables only the mitigation against CVE-2017-5715.

As of this time, there are no known reports that indicate that this Spectre Variant 2 (CVE-2017-5715 | Branch Target Injection) has been used to attack customers. We recommend that, when appropriate, Windows users reenable the mitigation against CVE-2017-5715 when Intel reports that this unpredictable system behavior has been resolved for your device.

I've heard that Intel has released microcode updates. Where can I find them?

In February 2018, Intel announced that they have completed their validations and started to release microcode for newer CPU platforms. Microsoft is making available Intel-validated microcode updates that are related to Spectre Variant 2 Spectre Variant 2 (CVE-2017-5715 | Branch Target Injection). KB4093836  lists specific knowledge base articles by Windows version. The KBs list available Intel microcode updates by CPU.

For more information, see AMD Security Updates and AMD Whitepaper: Architecture Guidelines around Indirect Branch Control . These are available from the OEM firmware channel.

I'm running Windows 10 April 2018 Update (version 1803). Is Intel microcode available for my device? Where can I find it?

We are making available Intel-validated microcode updates that concern Spectre Variant 2 (CVE-2017-5715 | Branch Target Injection). To get the latest Intel microcode updates through Windows Update, customers must have installed Intel microcode on devices running a Windows 10 operating system prior to upgrading to the Windows 10 April 2018 Update (version 1803).

The microcode update is also available directly from the Microsoft Update Catalog if it was not installed on the device before upgrading the system. Intel microcode is available through Windows Update, Windows Server Update Services (WSUS), or the Microsoft Update Catalog. For more information and download instructions, see KB4100347.

Where can I find information about the new speculative execution side-channel vulnerabilities (Speculative Store Bypass - CVE-2018-3639 and Rogue System Register Read - CVE-2018-3640)?

For more information, see the following resources:

Where can I find more information about Windows support for Speculative Store Bypass Disable (SSBD) in Intel processors?

See the “Recommended actions” and “FAQ” sections of ADV180012 | Microsoft Guidance for Speculative Store Bypass.

How do I determine whether SSBD is enabled or disabled?

To verify the status of SSBD, the Get-SpeculationControlSettings PowerShell script has been updated to detect affected processors, status of the SSBD operating system updates, and state of the processor microcode, if applicable. For more information and to obtain the PowerShell script, see KB4074629.

I've heard about "Lazy FP State Restore" (CVE-2018-3665). Will Microsoft release mitigations for it?

On June 13, 2018, an additional vulnerability that involves side-channel speculative execution, known as Lazy FP State Restore, was announced and assigned CVE-2018-3665 . For information about this vulnerability and recommended actions, see the Security Advisory ADV180016 | Microsoft Guidance for Lazy FP State Restore .

Note There are no required configuration (registry) settings for Lazy Restore FP Restore.

I've heard that CVE-2018-3693 (Bounds Check Bypass Store) is related to Spectre. Will Microsoft release mitigations for it?

Bounds Check Bypass Store (BCBS) was disclosed on July 10, 2018, and assigned CVE-2018-3693. We consider BCBS to belong to the same class of vulnerabilities as Bounds Check Bypass (Variant 1). We aren't currently aware of any instances of BCBS in our software. However, we are continuing to research this vulnerability class and will work with industry partners to release mitigations as required. We encourage researchers to submit any relevant findings to the Microsoft Speculative Execution Side Channel bounty program, including any exploitable instances of BCBS. Software developers should review the developer guidance that's been updated for BCBS at C++ Developer Guidance for Speculative Execution Side Channels

I've heard that L1 Terminal Fault (L1TF) was disclosed. Where can I find more information about it and Windows support for it?

On August 14, 2018, L1 Terminal Fault (L1TF) was announced and assigned multiple CVEs. These new speculative execution side-channel vulnerabilities can be used to read the content of memory across a trusted boundary and, if exploited, could lead to information disclosure. There are multiple vectors by which an attacker could trigger the vulnerabilities, depending on the configured environment. L1TF affects Intel® Core® processors and Intel® Xeon® processors.

For more information about this vulnerability and a detailed view of affected scenarios, including Microsoft's approach to mitigating L1TF, see the following resources:

How do I disable Hyper-Threading for L1TF on my device?

The steps to disable Hyper-Threading differ from OEM to OEM but are generally part of the BIOS or firmware setup and configuration tools.

Where can I get ARM64 firmware that mitigates CVE-2017-5715 \| Branch target injection (Spectre Variant 2)?

Customers who use 64-bit ARM processors should contact the device OEM for firmware support because ARM64 operating system protections that mitigate CVE-2017-5715 | Branch target injection (Spectre, Variant 2) require the latest firmware update from device OEMs to take effect.

Where can I find information about Intel’s disclosure around Microarchitectural Data Sampling (CVE-2018-11091, CVE-2018-12126, CVE-2018-12127, CVE-2018-12130)

For more information, refer to the following security advisories

Where can I find the scenario-based guidance to determine actions necessary to mitigate Microarchitectural Data Sampling vulnerabilities?

Further guidance can be found in Windows guidance to protect against speculative execution side-channel vulnerabilities

How do I disable Hyper-Threading for MDS on my device?

Please refer to guidance in Windows guidance to protect against speculative execution side-channel vulnerabilities

Where can I find guidance for Azure?

For Azure guidance, please refer to this article: Guidance for mitigating speculative execution side-channel vulnerabilities in Azure.

Where can I learn more about Retpoline enablement on Windows 10, version 1809?

For more information about Retpoline enablement, refer to our blog post: Mitigating Spectre variant 2 with Retpoline on Windows .

I've heard there is a variant of the Spectre Variant 1 speculative execution side channel vulnerability. Where can I learn more?

For details about this vulnerability, see the Microsoft Security Guide: CVE-2019-1125 | Windows Kernel Information Disclosure Vulnerability.

Does CVE-2019-1125 \| Windows Kernel Information Disclosure Vulnerability affect Microsoft’s cloud services?

We’re not aware of any instance of this information disclosure vulnerability affecting our cloud service infrastructure.

If updates for CVE-2019-1125 \| Windows Kernel Information Disclosure Vulnerability were released on July 9, 2019, why were the details published on August 6, 2019?

As soon as we became aware of this issue, we worked quickly to address it and release an update. We strongly believe in close partnerships with both researchers and industry partners to make customers more secure, and did not publish details until Tuesday, August 6, consistent with coordinated vulnerability disclosure practices.

Where can I find the scenario-based guidance to determine actions necessary to mitigate Intel Transactional Synchronization Extensions (Intel TSX) Transaction Asynchronous Abort vulnerability (CVE-2019-11135)?

Further guidance can be found in Windows guidance to protect against speculative execution side-channel vulnerabilities.

Do I need to disable Hyper-Threading for Intel Transactional Synchronization Extensions (Intel TSX) Transaction Asynchronous Abort vulnerability (CVE-2019-11135) on my device?

Further guidance can be found in Windows guidance to protect against speculative execution side-channel vulnerabilities.

Is there a way to disable Intel Transactional Synchronization Extensions (Intel TSX) capability?

Further guidance can be found in Guidance for disabling Intel Transactional Synchronization Extensions (Intel TSX) capability.

References

Third-party information disclaimer

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. We make no warranty, implied or otherwise, about the performance or reliability of these products.

We provide third-party contact information to help you find technical support. This contact information may change without notice. We do not guarantee the accuracy of this third-party contact information.