← Documents Documentation/admin-guide/hw-vuln/indirect-target-selection.rst GitHub 원문 ↗

Linux 6.18.37 · Administration / Hardware Vulnerabilities

Indirect Target Selection (ITS)

Intel ITS의 영향 CPU, cacheline 기반 thunk 완화, guest 처리와 kernel·sysfs 제어를 설명합니다.

Source pathDocumentation/admin-guide/hw-vuln/indirect-target-selection.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

영향 범위와 CPU

indirect-target-selection.rst:1-54

eIBRS guest/host isolation, intra-mode BTI, IBPB 영향과 Family_Model별 상태를 정리합니다.

thunk 기반 완화

indirect-target-selection.rst:55-109

cacheline 두 번째 절반의 safe thunk, dynamic/static thunk, retpoline, RSB stuffing과 guest 합성 bit를 설명합니다.

option과 sysfs 보고

indirect-target-selection.rst:110-168

`indirect_target_selection` option, sysfs 상태 문자열과 참고 자료를 제공합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 Indirect Target Selection (ITS)
4 ===============================
5
6 ITS is a vulnerability in some Intel CPUs that support Enhanced IBRS and were
7 released before Alder Lake. ITS may allow an attacker to control the prediction
8 of indirect branches and RETs located in the lower half of a cacheline.
9
10 ITS is assigned CVE-2024-28956 with a CVSS score of 4.7 (Medium).
11
12 Scope of Impact
13 ---------------
14 - **eIBRS Guest/Host Isolation**: Indirect branches in KVM/kernel may still be
15 predicted with unintended target corresponding to a branch in the guest.
16
17 - **Intra-Mode BTI**: In-kernel training such as through cBPF or other native
18 gadgets.
19
20 - **Indirect Branch Prediction Barrier (IBPB)**: After an IBPB, indirect
21 branches may still be predicted with targets corresponding to direct branches
22 executed prior to the IBPB. This is fixed by the IPU 2025.1 microcode, which
23 should be available via distro updates. Alternatively microcode can be
24 obtained from Intel's github repository [#f1]_.
25
26 Affected CPUs
27 -------------
28 Below is the list of ITS affected CPUs [#f2]_ [#f3]_:
29
30 ======================== ============ ==================== ===============
31 Common name Family_Model eIBRS Intra-mode BTI
32 Guest/Host Isolation
33 ======================== ============ ==================== ===============
34 SKYLAKE_X (step >= 6) 06_55H Affected Affected
35 ICELAKE_X 06_6AH Not affected Affected
36 ICELAKE_D 06_6CH Not affected Affected
37 ICELAKE_L 06_7EH Not affected Affected
38 TIGERLAKE_L 06_8CH Not affected Affected
39 TIGERLAKE 06_8DH Not affected Affected
40 KABYLAKE_L (step >= 12) 06_8EH Affected Affected
41 KABYLAKE (step >= 13) 06_9EH Affected Affected
42 COMETLAKE 06_A5H Affected Affected
43 COMETLAKE_L 06_A6H Affected Affected
44 ROCKETLAKE 06_A7H Not affected Affected
45 ======================== ============ ==================== ===============
46
47 - All affected CPUs enumerate Enhanced IBRS feature.
48 - IBPB isolation is affected on all ITS affected CPUs, and need a microcode
49 update for mitigation.
50 - None of the affected CPUs enumerate BHI_CTRL which was introduced in Golden
51 Cove (Alder Lake and Sapphire Rapids). This can help guests to determine the
52 host's affected status.
53 - Intel Atom CPUs are not affected by ITS.
54
55 Mitigation
56 ----------
57 As only the indirect branches and RETs that have their last byte of instruction
58 in the lower half of the cacheline are vulnerable to ITS, the basic idea behind
59 the mitigation is to not allow indirect branches in the lower half.
60
61 This is achieved by relying on existing retpoline support in the kernel, and in
62 compilers. ITS-vulnerable retpoline sites are runtime patched to point to newly
63 added ITS-safe thunks. These safe thunks consists of indirect branch in the
64 second half of the cacheline. Not all retpoline sites are patched to thunks, if
65 a retpoline site is evaluated to be ITS-safe, it is replaced with an inline
66 indirect branch.
67
68 Dynamic thunks
69 ~~~~~~~~~~~~~~
70 From a dynamically allocated pool of safe-thunks, each vulnerable site is
71 replaced with a new thunk, such that they get a unique address. This could
72 improve the branch prediction accuracy. Also, it is a defense-in-depth measure
73 against aliasing.
74
75 Note, for simplicity, indirect branches in eBPF programs are always replaced
76 with a jump to a static thunk in __x86_indirect_its_thunk_array. If required,
77 in future this can be changed to use dynamic thunks.
78
79 All vulnerable RETs are replaced with a static thunk, they do not use dynamic
80 thunks. This is because RETs get their prediction from RSB mostly that does not
81 depend on source address. RETs that underflow RSB may benefit from dynamic
82 thunks. But, RETs significantly outnumber indirect branches, and any benefit
83 from a unique source address could be outweighed by the increased icache
84 footprint and iTLB pressure.
85
86 Retpoline
87 ~~~~~~~~~
88 Retpoline sequence also mitigates ITS-unsafe indirect branches. For this
89 reason, when retpoline is enabled, ITS mitigation only relocates the RETs to
90 safe thunks. Unless user requested the RSB-stuffing mitigation.
91
92 RSB Stuffing
93 ~~~~~~~~~~~~
94 RSB-stuffing via Call Depth Tracking is a mitigation for Retbleed RSB-underflow
95 attacks. And it also mitigates RETs that are vulnerable to ITS.
96
97 Mitigation in guests
98 ^^^^^^^^^^^^^^^^^^^^
99 All guests deploy ITS mitigation by default, irrespective of eIBRS enumeration
100 and Family/Model of the guest. This is because eIBRS feature could be hidden
101 from a guest. One exception to this is when a guest enumerates BHI_DIS_S, which
102 indicates that the guest is running on an unaffected host.
103
104 To prevent guests from unnecessarily deploying the mitigation on unaffected
105 platforms, Intel has defined ITS_NO bit(62) in MSR IA32_ARCH_CAPABILITIES. When
106 a guest sees this bit set, it should not enumerate the ITS bug. Note, this bit
107 is not set by any hardware, but is **intended for VMMs to synthesize** it for
108 guests as per the host's affected status.
109
110 Mitigation options
111 ^^^^^^^^^^^^^^^^^^
112 The ITS mitigation can be controlled using the "indirect_target_selection"
113 kernel parameter. The available options are:
114
115 ======== ===================================================================
116 on (default) Deploy the "Aligned branch/return thunks" mitigation.
117 If spectre_v2 mitigation enables retpoline, aligned-thunks are only
118 deployed for the affected RET instructions. Retpoline mitigates
119 indirect branches.
120
121 off Disable ITS mitigation.
122
123 vmexit Equivalent to "=on" if the CPU is affected by guest/host isolation
124 part of ITS. Otherwise, mitigation is not deployed. This option is
125 useful when host userspace is not in the threat model, and only
126 attacks from guest to host are considered.
127
128 stuff Deploy RSB-fill mitigation when retpoline is also deployed.
129 Otherwise, deploy the default mitigation. When retpoline mitigation
130 is enabled, RSB-stuffing via Call-Depth-Tracking also mitigates
131 ITS.
132
133 force Force the ITS bug and deploy the default mitigation.
134 ======== ===================================================================
135
136 Sysfs reporting
137 ---------------
138
139 The sysfs file showing ITS mitigation status is:
140
141 /sys/devices/system/cpu/vulnerabilities/indirect_target_selection
142
143 Note, microcode mitigation status is not reported in this file.
144
145 The possible values in this file are:
146
147 .. list-table::
148
149 * - Not affected
150 - The processor is not vulnerable.
151 * - Vulnerable
152 - System is vulnerable and no mitigation has been applied.
153 * - Vulnerable, KVM: Not affected
154 - System is vulnerable to intra-mode BTI, but not affected by eIBRS
155 guest/host isolation.
156 * - Mitigation: Aligned branch/return thunks
157 - The mitigation is enabled, affected indirect branches and RETs are
158 relocated to safe thunks.
159 * - Mitigation: Retpolines, Stuffing RSB
160 - The mitigation is enabled using retpoline and RSB stuffing.
161
162 References
163 ----------
164 .. [#f1] Microcode repository - https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files
165
166 .. [#f2] Affected Processors list - https://www.intel.com/content/www/us/en/developer/topic-technology/software-security-guidance/processors-affected-consolidated-product-cpu-model.html
167
168 .. [#f3] Affected Processors list (machine readable) - https://github.com/intel/Intel-affected-processor-list
169

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Indirect Target Selection 개요

1-11

Indirect Target Selection(ITS)은 Enhanced IBRS를 지원하며 Alder Lake 이전에 출시된 일부 Intel CPU의 취약점입니다. 공격자는 cacheline 아래쪽 절반에 위치한 indirect branch와 `RET`의 예측을 제어할 수 있습니다.

ITS에는 `CVE-2024-28956`이 할당되었으며 CVSS 점수는 4.7(Medium)입니다.

영향 범위

12-25
  • **eIBRS Guest/Host Isolation**: KVM/kernel의 indirect branch가 guest의 branch에 대응하는 의도하지 않은 대상으로 여전히 예측될 수 있습니다.
  • **Intra-Mode BTI**: cBPF 또는 다른 native gadget을 통한 in-kernel training이 가능합니다.
  • **Indirect Branch Prediction Barrier (IBPB)**: IBPB 뒤에도 indirect branch가 IBPB 이전에 실행된 direct branch에 대응하는 대상으로 예측될 수 있습니다. 이 문제는 IPU 2025.1 microcode에서 수정되며 distribution update 또는 Intel microcode repository `[#f1]_`에서 받을 수 있습니다.

영향받는 CPU

26-54

다음 CPU가 ITS의 영향을 받습니다 `[#f2]_` `[#f3]_`.

Common nameFamily_ModeleIBRS Guest/Host IsolationIntra-mode BTI
SKYLAKE_X (step >= 6)06_55HAffectedAffected
ICELAKE_X06_6AHNot affectedAffected
ICELAKE_D06_6CHNot affectedAffected
ICELAKE_L06_7EHNot affectedAffected
TIGERLAKE_L06_8CHNot affectedAffected
TIGERLAKE06_8DHNot affectedAffected
KABYLAKE_L (step >= 12)06_8EHAffectedAffected
KABYLAKE (step >= 13)06_9EHAffectedAffected
COMETLAKE06_A5HAffectedAffected
COMETLAKE_L06_A6HAffectedAffected
ROCKETLAKE06_A7HNot affectedAffected
  • 영향받는 모든 CPU는 Enhanced IBRS feature를 열거합니다.
  • ITS의 영향을 받는 모든 CPU에서 IBPB isolation도 영향을 받으므로 완화하려면 microcode update가 필요합니다.
  • 영향받는 CPU 중 Golden Cove(Alder Lake 및 Sapphire Rapids)에서 도입된 `BHI_CTRL`을 열거하는 CPU는 없습니다. guest는 이를 이용해 host의 영향 여부를 판단할 수 있습니다.
  • Intel Atom CPU는 ITS의 영향을 받지 않습니다.

cacheline 배치를 이용한 완화

55-67

명령의 마지막 byte가 cacheline 아래쪽 절반에 놓인 indirect branch와 `RET`만 ITS에 취약합니다. 따라서 완화의 기본 원리는 indirect branch가 아래쪽 절반에 놓이지 않게 하는 것입니다.

커널과 compiler의 기존 retpoline 지원을 이용해 이를 구현합니다. ITS에 취약한 retpoline site는 runtime에 새 ITS-safe thunk를 가리키도록 patch됩니다. safe thunk의 indirect branch는 cacheline의 두 번째 절반에 놓입니다. 모든 retpoline site를 thunk로 바꾸지는 않으며, ITS-safe로 판정된 site는 inline indirect branch로 교체합니다.

Dynamic thunk

68-85

동적으로 할당된 safe-thunk pool에서 각 취약 site를 고유 주소의 새 thunk로 교체합니다. 이는 branch prediction 정확도를 높일 수 있고 aliasing에 대한 defense-in-depth 수단도 됩니다.

단순화를 위해 eBPF program의 indirect branch는 항상 `__x86_indirect_its_thunk_array`의 static thunk로 jump하도록 교체합니다. 필요하다면 나중에 dynamic thunk를 사용하도록 바꿀 수 있습니다.

취약한 모든 `RET`는 static thunk로 교체하며 dynamic thunk를 사용하지 않습니다. `RET`는 대부분 source address에 의존하지 않는 RSB에서 예측을 얻기 때문입니다. RSB underflow가 발생하는 `RET`는 dynamic thunk의 이점을 얻을 수 있지만, `RET` 수가 indirect branch보다 훨씬 많으므로 고유 source address의 이점보다 icache footprint와 iTLB pressure 증가 비용이 더 클 수 있습니다.

Retpoline과 RSB stuffing

86-96

retpoline sequence도 ITS-unsafe indirect branch를 완화합니다. 그래서 retpoline이 활성화된 경우 ITS 완화는 사용자가 RSB-stuffing 완화를 요청하지 않는 한 `RET`만 safe thunk로 재배치합니다.

Call Depth Tracking을 통한 RSB stuffing은 Retbleed RSB-underflow 공격의 완화이며, ITS에 취약한 `RET`도 함께 완화합니다.

guest에서의 완화

97-109

모든 guest는 eIBRS 열거 여부와 guest의 Family/Model에 관계없이 ITS 완화를 기본으로 적용합니다. eIBRS feature가 guest에서 숨겨질 수 있기 때문입니다. 예외는 guest가 `BHI_DIS_S`를 열거하는 경우이며, 이는 영향받지 않는 host에서 실행 중임을 나타냅니다.

영향받지 않는 platform의 guest가 불필요하게 완화를 적용하지 않도록 Intel은 `MSR IA32_ARCH_CAPABILITIES`에 `ITS_NO` bit(62)를 정의했습니다. 이 bit를 본 guest는 ITS bug를 열거하지 않아야 합니다. 어떤 hardware도 이 bit를 직접 설정하지 않으며, host의 영향 상태에 따라 VMM이 guest용으로 합성하도록 의도된 bit입니다.

indirect_target_selection option

110-135

ITS 완화는 `indirect_target_selection` kernel parameter로 제어합니다.

option동작
on기본값입니다. `Aligned branch/return thunks` 완화를 적용합니다. `spectre_v2` 완화가 retpoline을 켰다면 aligned thunk는 영향을 받는 RET에만 적용되고 indirect branch는 retpoline이 완화합니다.
offITS 완화를 비활성화합니다.
vmexitCPU가 ITS의 guest/host isolation 부분에 영향을 받으면 `on`과 동일하며, 아니면 완화를 적용하지 않습니다. host userspace가 threat model에 없고 guest-to-host 공격만 고려할 때 유용합니다.
stuffretpoline도 적용된 경우 RSB-fill 완화를 배치하고, 아니면 기본 완화를 배치합니다. retpoline이 활성화되면 Call-Depth-Tracking을 통한 RSB stuffing도 ITS를 완화합니다.
forceITS bug를 강제로 표시하고 기본 완화를 적용합니다.

ITS sysfs 보고

136-161

ITS 완화 상태는 다음 sysfs file에서 확인합니다.

/sys/devices/system/cpu/vulnerabilities/indirect_target_selection

이 file은 microcode 완화 상태를 보고하지 않습니다.

상태 문자열의미
Not affected프로세서가 취약하지 않습니다.
Vulnerablesystem이 취약하며 적용된 완화가 없습니다.
Vulnerable, KVM: Not affectedsystem은 intra-mode BTI에는 취약하지만 eIBRS guest/host isolation의 영향은 받지 않습니다.
Mitigation: Aligned branch/return thunks완화가 켜졌으며 영향을 받는 indirect branch와 RET가 safe thunk로 재배치되었습니다.
Mitigation: Retpolines, Stuffing RSBretpoline과 RSB stuffing을 사용하는 완화가 켜졌습니다.

참고 자료

162-168
표시자료
[#f1]Microcode repository - https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files
[#f2]Affected Processors list - https://www.intel.com/content/www/us/en/developer/topic-technology/software-security-guidance/processors-affected-consolidated-product-cpu-model.html
[#f3]Affected Processors list (machine readable) - https://github.com/intel/Intel-affected-processor-list