vSphere 用 Intel プロセッサにおける「L1 Terminal Fault」(L1TF - VMM) 投機的実行の脆弱性に対する VMware の対応 CVE-2018-3646
search cancel

vSphere 用 Intel プロセッサにおける「L1 Terminal Fault」(L1TF - VMM) 投機的実行の脆弱性に対する VMware の対応 CVE-2018-3646

book

Article ID: 324599

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
この記事では、vSphere で CVE-2018-3646 (L1 Terminal Fault - VMM) を解決するために必要なハイパーバイザー固有の軽減策について説明します。

CVE-2018-3646 の概要

Intel は「L1 Terminal Fault」と総称される、CPU での投機的実行に関する新しい脆弱性について詳細を開示しました。この脆弱性は、過去および現在の Intel プロセッサ(少なくとも 2009 ~ 2018 年)で発生する可能性があります(影響を受けるサポート対象の vSphere プロセッサについては、表 1 を参照)。

影響を受ける Intel マイクロプロセッサが許可されているデータ アクセス以外の投機的動作を行うと、Meltdown、Rogue System Register Read、「Lazy FP state restore」などの「L1 Terminal Fault」の脆弱性が発生することがあります。 このような場合に投機的動作を継続すると、影響を受ける Intel マイクロプロセッサに、攻撃対象となる新しいサイドチャネルが生じます。 (ただし、機的動作は後で侵入者が撤退したときに無効になるため、アーキテクチャ面での正当性は維持されることに注意してください)。

CVE-2018-3646 はこのような Intel マイクロプロセッサの脆弱性の 1 つであり、ハイパーバイザーに影響をもたらします。 ハイパーバイザーまたは別の仮想マシンが権限を持つ情報が同じコアの L1 データ キャッシュ内に同時に存在する場合は、特定の CPU コアで実行されている悪意のある仮想マシンによってこの情報の内容が実際に推論される可能性があります。 現在の Intel プロセッサは、ハイパースレッディング (HT) 対応コアの両方の論理プロセッサで、物理的に解決された L1 データ キャッシュを共有します。両方の論理プロセッサでソフトウェア スレッドの同時スケジュール設定を無差別に行うと、情報がさらに漏洩する可能性が生じます。 CVE-2018-3646 には現在判明している攻撃ベクトルが 2 つあります(ここでは「シーケンシャルコンテキスト」と「同時コンテキスト」と表します)。 CVE-2018-3646 を軽減するには、両方の攻撃ベクトルに対処する必要があります。

攻撃ベクトルの概要
  • シーケンシャルコンテキスト攻撃ベクトル:悪意のある仮想マシンは、プロセッサ コアのいずれかの論理プロセッサ上にある以前のコンテキストの L1 データ(ハイパーバイザー スレッドまたは他の仮想マシンのスレッド)の中から、最近アクセスされたものを推測できる可能性があります。
  • 同時コンテキスト攻撃ベクトル:悪意のある仮想マシンは、ハイパースレッディング対応プロセッサ コアの他の論理プロセッサ上にある同時実行コンテキストの L1 データ(ハイパーバイザー スレッドまたは他の仮想マシンのスレッド)の中から、最近アクセスされたものを推測できる可能性があります。

軽減策の概要
  • シーケンシャルコンテキスト攻撃ベクトルを軽減するには、vSphere の更新やパッチを適用します。 この軽減策はデフォルトで有効になっていて、パフォーマンスに大きな影響を与えません。 詳細については、「対策」セクションを参照してください。
  • 同時コンテキスト攻撃ベクトルを軽減するには、ESXi サイドチャネル対応スケジューラと呼ばれる新しい機能を有効にする必要があります。 この機能の最初のバージョンでは、Intel ハイパースレッディング対応コアのいずれかの論理プロセッサ上にあるハイパーバイザーおよび仮想マシンにのみスケジュールが設定されます。 この機能はパフォーマンスに大きな影響を及ぼし、デフォルトでは無効になっています。 詳細については、「対策」セクションを参照してください。

重要: vSphere の更新およびパッチを適用した後に、ファームウェア/BIOS で(または VMkernel.Boot.Hyperthreading を使用して)Intel ハイパースレッディングを無効にすることはお勧めしません。これを無効にすると、有効になっていた可能性のある vSphere スケジューラが無効になり、両方の論理プロセッサを使用できる軽減策を実行できなくなります。 

ファームウェア / BIOS で (または VMkernel.Boot.Hyperthreading を使用して) Intel ハイパースレッディングを明示的に無効にするのとは異なり、L1TF-VMM に対して脆弱ではない AMD プロセッサおよび新しい Intel プロセッサでは、ESXi サイドチャネル対応スケジューラの有効化は無視されます。[影響を受ける vSphere プロセッサについては表 1 を参照してください]


Resolution

The mitigation process for CVE-2018-3646 consists of three phases:
  1. Update Phase: Updating and Patching vSphere
To mitigate  Sequential-context attacks ,  update vSphere to the product versions listed in VMware Security Advisory VMSA-2018-0020 . This mitigation leverages Intel microcode updates (shipped in separate ESXi patches for most Intel hardware platforms).  See also VMSA-2018-0020 . This mitigation is enabled by default and does not significantly impact performance.

Note : As shown in the workflow above, you must update the vCenter Server before applying the ESXi patch. The aforementioned updates and patches added notification messages explaining that the ESXi Side-Channel-Aware Scheduler must be enabled to mitigate the Concurrent-context attack vector for CVE-2018-3646 . If ESXi is updated before the vCenter Server, you may receive cryptic notification messages related to this. After the vCenter is updated, the notifications will appear correctly.
  1. Planning Phase: Assessing the Environment
The Concurrent-context attack vector can be mitigated by enabling the ESXi Side-Channel-Aware Scheduler ,  which is included in the updates and patches listed in  VMSA-2018-0020 . By default, this scheduler is not enabled. Enabling this scheduler can have a significant performance impact on applications running in your vSphere environment. The goal of the planning phase is to understand whether your concurrent environment has the necessary CPU capacity to enable the scheduler without impacting operation. The following list outlines potential problem areas after enabling the ESXi Side-Channel-Aware Scheduler :
  • Virtual machines with more vCPUs than the physical cores available on the ESXi host
  • Virtual machines with custom affinity or NUMA settings
  • Virtual machines with latency-sensitive configurations
  • ESXi hosts with average CPU utilization above 70%
  • Hosts with custom CPU resource management options enabled
  • HA Cluster with Rolling Upgrade Average CPU Utilization Above 100%
Important : The above list is intended to provide a high-level overview of problem areas related to enabling the ESXi Side-Channel-Aware Scheduler .
NoteYou may have to acquire additional hardware or rebalance existing workloads before enabling the ESXi Side-Channel-Aware Scheduler . Organizations may choose not to enable the ESXi Side-Channel-Aware Scheduler after conducting a risk assessment and accepting the risks posed by the Concurrent-context attack vector . This is not recommended and VMware cannot make this decision on your behalf.
  1. Scheduler enable phase:
a.  Enabling the ESXi Side-Channel-Aware Scheduler  on ESXi 5.5, 6.0, 6.5, 6.7 (6.7u2 and earlier), 7.0  After addressing the problem areas listed above during the planning phase, mitigating the Concurrent-context attack vector  for CVE-2018-3646 requires enabling  the ESXi Side-Channel-Aware Scheduler . This scheduler  can be enabled on individual ESXi hosts using the advanced configuration option hyperthreadingMitigation . Note :


  • Enabling this option causes the vSphere UI to report a single logical processor per physical core (half the number of logical processors if hyperthreading was enabled), and causes hyperthreading to show as Disabled in various settings tabs.
  • The current  ESXi Side-Channel-Aware Scheduler  can also address CVE-2018-5407 .

Enabling the ESXi Side-Channel-Aware Scheduler using the vSphere Web Client or vSphere Client 
  1. Connect to the vCenter Server using the vSphere Web Client or vSphere Client.
  2. Select the ESXi host in the inventory.
  3.  Click the Administration tab (5.5/6.0) or the Settings tab (6.5/6.7).
  4.  Click the Settings sub-tab.
  5. Under the System heading,  click Advanced system settings .
  6. Click in the Filter box and search for VMkernel.Boot.hyperthreadingMitigation.
  7. Select the setting by name and click Edit (pencil icon).
  8. Change the configuration option to true (default is false).
  9.  Click OK .
  10. Reboot the ESXi host for the configuration changes to take effect.
Enabling the ESXi Side-Channel-Aware Scheduler using the ESXi Embedded Host Client 
  1.  Connect to the ESXi host by opening a web browser to https:// HOSTNAME .
  2.  Click the Admin tab.
  3.  Click the Advanced sub -tab.
  4. Click in the Filter box and search for VMkernel.Boot.hyperthreadingMitigation.
  5. Select the setting by name and click Edit (pencil icon).
  6. Change the configuration option to true (default is false).
  7.  Click Save .
  8. Reboot the ESXi host for the configuration changes to take effect.

Enabling the ESXi Side-Channel-Aware Scheduler Configuration Using ESXCLI 
  1. SSH into the ESXi host or open a console with Remote ESXCLI installed.
  2. Run esxcli system settings kernel list -o hyperthreadingMitigation to check the current runtime value of the HT-aware mitigation setting.
The return value of this command will be something like this:
  1. To enable HT-aware mitigations, run the following command:
esxcli system settings kernel set -s hyperthreadingMitigation -v TRUE
  1. Reboot the ESXi host for the configuration changes to take effect.

b.  Enabling  the ESXi Side-Channel-Aware Scheduler  (SCAv1) or   ESXi Side-Channel-Aware Scheduler v2 (SCAv2) in  ESXi 6.7u2 ( 13006603 ) and later 
releases. Note: ESXi 6.7u2 (13006603) and later releases  include the ESXi Side-Channel-Aware Scheduler v2

. Previous release lines such as 6.5, 6.0, and 5.5 do not support this new scheduler . VMware has published a white paper, Performance of vSphere 6.7 Scheduling Options, which provides more details on the performance differences between SCAv1 and SCAv2. Please review this document before proceeding.  Enabling the ESXi Side-Channel-Aware Scheduler

(SCAv1) using the vSphere Web Client or vSphere Client 
  1. Connect to the vCenter Server using the vSphere Web Client or vSphere Client.
  2. Select the ESXi host in the inventory.
  3. Click the Settings or Configuration tab.
  4. Under the System heading,  click Advanced system settings .
  5. Click Edit .
  6. Click in the Filter box and search for VMkernel.Boot.hyperthreadingMitigation.
  7. Select by the name of the setting.
  8. Change the configuration option to true (default is false).
  9. Click in the Filter box and search for VMkernel.Boot.hyperthreadingMitigationIntraVM.
  10. Change the configuration option to true (default is true).
  11.  Click OK .
  12. Reboot the ESXi host for the configuration changes to take effect.
 Enabling the ESXi Side-Channel-Aware Scheduler (SCAv1) using the ESXi Embedded Host Client 
  1.  Connect to the ESXi host by opening a web browser to https://HOSTNAME .
  2.  Click the Admin tab.
  3.  Click the Advanced sub -tab.
  4. Click in the Filter box and search for VMkernel.Boot.hyperthreadingMitigation.
  5. Select the setting by name and click Edit Options  .
  6. Change the configuration option to true (default is false).
  7.  Click Save .
  8. Click in the Filter box and search for VMkernel.Boot.hyperthreadingMitigationIntraVM.
  9. Select the setting by name and click Edit Options  .
  10. Change the configuration option to true (default is true).
  11.  Click Save .
  12. Reboot the ESXi host for the configuration changes to take effect.

 Enabling the ESXi Side-Channel-Aware Scheduler (SCAv1) using ESXCLI 
  1. SSH into the ESXi host or open a console with Remote ESXCLI installed. 
  2. Run esxcli system settings kernel list -o hyperthreadingMitigation and esxcli system settings kernel list -o hyperthreadingMitigationIntraVM to check the current settings.
  3. To enable the ESXi Side-Channel-Aware Scheduler  (SCAv1), run the following command:
  4. esxcli system settings kernel set -s hyperthreadingMitigation -v TRUE
  5. esxcli system settings kernel set -s hyperthreadingMitigationIntraVM -v TRUE
  6. Reboot the ESXi host for the configuration changes to take effect.
 Enabling the ESXi Side-Channel-Aware Scheduler (SCAv2) using the vSphere Web Client or vSphere Client 
  1. Connect to the vCenter Server using the vSphere Web Client or vSphere Client.
  2. Select the ESXi host in the inventory.
  3. Click the Settings or Configuration tab.
  4. Under the System heading,  click Advanced system settings .
  5. Click Edit .
  6. Click in the Filter box and search for VMkernel.Boot.hyperthreadingMitigation.
  7. Select by the name of the setting.
  8. Change the configuration option to true (default is false).
  9. Click in the Filter box and search for VMkernel.Boot.hyperthreadingMitigationIntraVM.
  10. Change the configuration option to false (default is true).
  11.  Click OK .
  12. Reboot the ESXi host for the configuration changes to take effect.

 Enabling the ESXi Side-Channel-Aware Scheduler (SCAv2) using the ESXi Embedded Host Client 
  1.  Connect to the ESXi host by opening a web browser to https:// HOSTNAME .
  2.  Click the Admin tab.
  3.  Click the Advanced sub -tab.
  4. Click in the Filter box and search for VMkernel.Boot.hyperthreadingMitigation.
  5. Select the setting by name and click Edit Options  .
  6. Change the configuration option to true (default is false).
  7.  Click Save .
  8. Click in the Filter box and search for VMkernel.Boot.hyperthreadingMitigationIntraVM.
  9. Select the setting by name and click Edit Options  .
  10. Change the configuration option to false (default is true).
  11.  Click Save .
  12. Reboot the ESXi host for the configuration changes to take effect.
 Enabling the ESXi Side-Channel-Aware Scheduler (SCAv2) using ESXCLI 
  1. SSH into the ESXi host or open a console with Remote ESXCLI installed. 
  2. Run esxcli system settings kernel list -o hyperthreadingMitigation and esxcli system settings kernel list -o hyperthreadingMitigationIntraVM to check the current settings.
  3. To enable the ESXi Side-Channel-Aware Scheduler  (SCAv2), run the following command:
  4. esxcli system settings kernel set -s hyperthreadingMitigation -v TRUE
  5. esxcli system settings kernel set -s hyperthreadingMitigationIntraVM -v FALSE
  6. Reboot the ESXi host for the configuration changes to take effect.

Overview of Scheduler Settings in ESXi 6.7 U2 (or later)
hyperthreadingMitigation hyperthreadingMitigationIntraVM Scheduler Enabled
FALSE TRUE or FALSE Default Scheduler (No Mitigations)
TRUE TRUE SCAv1
TRUE FALSE SCAv2


HT-Aware Mitigation Tool

VMware has prepared a tool to assist in both  the planning and scheduler enablement phases at scale. This tool  is provided in HTAware Mitigation Tool Overview and Usage

Table 1 : Affected ESXi Supported Intel Processors
Intel code name FMS Intel brand names
Nehalem-EP 0x106a5 Intel Xeon 35xx series,
Intel Xeon 55xx series
Lynnfield 0x106e5 Intel Xeon 34xx Lynnfield series
Clarkdale 0x20652 Intel i3/i5 Clarkdale series,
Intel Xeon 34xx Clarkdale series
Arrandale 0x20655 Intel Core i7-620LE processor
Sandy Bridge DT 0x206a7 Intel Xeon E3-1100 series,
Intel Xeon E3-1200 series,
Intel i7-2655-LE series, Intel i3-2100 series
Westmere EP 0x206c2 Intel Xeon 56xx series,
Intel Xeon 36xx series
Sandy Bridge EP 0x206d7 Intel Pentium 1400 series,
Intel Xeon E5-1400 series,
Intel Xeon E5-1600 series,
Intel Xeon E5-2400 series,
Intel Xeon E5-2600 series,
Intel Xeon E5-4600 series
Nehalem EX 0x206e6 Intel Xeon 65xx series,
Intel Xeon 75xx series
Westmere EX 0x206f2 Intel Xeon E7-8800 series,
Intel Xeon E7-4800 series,
Intel Xeon E7-2800 series,
Ivy Bridge DT 0x306a9 Intel i3-3200 series, Intel i7-3500-LE/UE, Intel i7-3600-QE,
Intel Xeon E3-1200-v2 series,
Intel Xeon E3-1100-C-v2 series,
Intel Pentium B925C
Haswell DT 0x306c3 Intel Xeon E3-1200-v3 Series
Ivy Bridge EP 0x306e4 Intel Xeon E5-4600-v2 series,
Intel Xeon E5-2400-v2 series,
Intel Xeon E5-2600-v2 series,
Intel Xeon E5-1400-v2 series,
Intel Xeon E5-2600-v2 series
Ivy Bridge EX 0x306e7 Intel Xeon E7-8800/4800/2800-v2 series
Haswell EP 0x306f2 Intel Xeon E5-2400-v3 series,
Intel Xeon E5-1400-v3 series,
Intel Xeon E5-1600-v3 series,
Intel Xeon E5-2600-v3 series,
Intel Xeon E5-4600-v3 series
Haswell EX 0x306f4 Intel Xeon E7-8800/4800-v3 Series
Broadwell H 0x40671 Intel Core i7-5700EQ,
Intel Xeon E3-1200-v4 series
Avoton 0x406d8 Intel Atom C2300 series,
Intel Atom C2500 series,
Intel Atom C2700 series
Broadwell EP/EX 0x406f1 Intel Xeon E7-8800/4800-v4 series,
Intel Xeon E5-4600-v4 series,
Intel Xeon E5-2600-v4 series,
Intel Xeon E5-1600-v4 series
Skylake SP 0x50654 Intel Xeon Platinum 8100 (Skylake-SP) series,
Intel Xeon Gold 6100/5100 (Skylake-SP) series
Intel Xeon Silver 4100, Bronze 3100 (Skylake-SP) series
Broadwell DE 0x50662 Intel Xeon D-1500 Series
Broadwell DE 0x50663 Intel Xeon D-1500 Series
Broadwell DE 0x50664 Intel Xeon D-1500 Series
Broadwell NS 0x50665 Intel Xeon D-1500 Series
Skylake H/S 0x506e3 Intel Xeon E3-1500-v5 series,
Intel Xeon E3-1200-v5 series
Kaby Lake H/S/X 0x906e9 Intel Xeon E3-1200-v6


Additional Information