요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
CPU와 MSR bit
processor_mmio_stale_data.rst:77-149영향 Family_Model·stepping과 SBDR_SSDP_NO·FB_CLEAR 계열 bit를 정리합니다.
VERW 완화와 제어
processor_mmio_stale_data.rst:150-245전환 지점별 buffer clearing, `mmio_stale_data=`와 sysfs 상태를 제공합니다.
Servicing과 SMT
processor_mmio_stale_data.rst:246-269IPU·ESU 정의, SMT 상태 suffix와 참고 자료를 보존합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
=========================================
Processor MMIO Stale Data Vulnerabilities
=========================================
Processor MMIO Stale Data Vulnerabilities are a class of memory-mapped I/O
(MMIO) vulnerabilities that can expose data. The sequences of operations for
exposing data range from simple to very complex. Because most of the
vulnerabilities require the attacker to have access to MMIO, many environments
are not affected. System environments using virtualization where MMIO access is
provided to untrusted guests may need mitigation. These vulnerabilities are
not transient execution attacks. However, these vulnerabilities may propagate
stale data into core fill buffers where the data can subsequently be inferred
by an unmitigated transient execution attack. Mitigation for these
vulnerabilities includes a combination of microcode update and software
changes, depending on the platform and usage model. Some of these mitigations
are similar to those used to mitigate Microarchitectural Data Sampling (MDS) or
those used to mitigate Special Register Buffer Data Sampling (SRBDS).
Data Propagators
================
Propagators are operations that result in stale data being copied or moved from
one microarchitectural buffer or register to another. Processor MMIO Stale Data
Vulnerabilities are operations that may result in stale data being directly
read into an architectural, software-visible state or sampled from a buffer or
register.
Fill Buffer Stale Data Propagator (FBSDP)
-----------------------------------------
Stale data may propagate from fill buffers (FB) into the non-coherent portion
of the uncore on some non-coherent writes. Fill buffer propagation by itself
does not make stale data architecturally visible. Stale data must be propagated
to a location where it is subject to reading or sampling.
Sideband Stale Data Propagator (SSDP)
-------------------------------------
The sideband stale data propagator (SSDP) is limited to the client (including
Intel Xeon server E3) uncore implementation. The sideband response buffer is
shared by all client cores. For non-coherent reads that go to sideband
destinations, the uncore logic returns 64 bytes of data to the core, including
both requested data and unrequested stale data, from a transaction buffer and
the sideband response buffer. As a result, stale data from the sideband
response and transaction buffers may now reside in a core fill buffer.
Primary Stale Data Propagator (PSDP)
------------------------------------
The primary stale data propagator (PSDP) is limited to the client (including
Intel Xeon server E3) uncore implementation. Similar to the sideband response
buffer, the primary response buffer is shared by all client cores. For some
processors, MMIO primary reads will return 64 bytes of data to the core fill
buffer including both requested data and unrequested stale data. This is
similar to the sideband stale data propagator.
Vulnerabilities
===============
Device Register Partial Write (DRPW) (CVE-2022-21166)
-----------------------------------------------------
Some endpoint MMIO registers incorrectly handle writes that are smaller than
the register size. Instead of aborting the write or only copying the correct
subset of bytes (for example, 2 bytes for a 2-byte write), more bytes than
specified by the write transaction may be written to the register. On
processors affected by FBSDP, this may expose stale data from the fill buffers
of the core that created the write transaction.
Shared Buffers Data Sampling (SBDS) (CVE-2022-21125)
----------------------------------------------------
After propagators may have moved data around the uncore and copied stale data
into client core fill buffers, processors affected by MFBDS can leak data from
the fill buffer. It is limited to the client (including Intel Xeon server E3)
uncore implementation.
Shared Buffers Data Read (SBDR) (CVE-2022-21123)
------------------------------------------------
It is similar to Shared Buffer Data Sampling (SBDS) except that the data is
directly read into the architectural software-visible state. It is limited to
the client (including Intel Xeon server E3) uncore implementation.
Affected Processors
===================
Not all the CPUs are affected by all the variants. For instance, most
processors for the server market (excluding Intel Xeon E3 processors) are
impacted by only Device Register Partial Write (DRPW).
Below is the list of affected Intel processors [#f1]_:
=================== ============ =========
Common name Family_Model Steppings
=================== ============ =========
HASWELL_X 06_3FH 2,4
SKYLAKE_L 06_4EH 3
BROADWELL_X 06_4FH All
SKYLAKE_X 06_55H 3,4,6,7,11
BROADWELL_D 06_56H 3,4,5
SKYLAKE 06_5EH 3
ICELAKE_X 06_6AH 4,5,6
ICELAKE_D 06_6CH 1
ICELAKE_L 06_7EH 5
ATOM_TREMONT_D 06_86H All
LAKEFIELD 06_8AH 1
KABYLAKE_L 06_8EH 9 to 12
ATOM_TREMONT 06_96H 1
ATOM_TREMONT_L 06_9CH 0
KABYLAKE 06_9EH 9 to 13
COMETLAKE 06_A5H 2,3,5
COMETLAKE_L 06_A6H 0,1
ROCKETLAKE 06_A7H 1
=================== ============ =========
If a CPU is in the affected processor list, but not affected by a variant, it
is indicated by new bits in MSR IA32_ARCH_CAPABILITIES. As described in a later
section, mitigation largely remains the same for all the variants, i.e. to
clear the CPU fill buffers via VERW instruction.
New bits in MSRs
================
Newer processors and microcode update on existing affected processors added new
bits to IA32_ARCH_CAPABILITIES MSR. These bits can be used to enumerate
specific variants of Processor MMIO Stale Data vulnerabilities and mitigation
capability.
MSR IA32_ARCH_CAPABILITIES
--------------------------
Bit 13 - SBDR_SSDP_NO - When set, processor is not affected by either the
Shared Buffers Data Read (SBDR) vulnerability or the sideband stale
data propagator (SSDP).
Bit 14 - FBSDP_NO - When set, processor is not affected by the Fill Buffer
Stale Data Propagator (FBSDP).
Bit 15 - PSDP_NO - When set, processor is not affected by Primary Stale Data
Propagator (PSDP).
Bit 17 - FB_CLEAR - When set, VERW instruction will overwrite CPU fill buffer
values as part of MD_CLEAR operations. Processors that do not
enumerate MDS_NO (meaning they are affected by MDS) but that do
enumerate support for both L1D_FLUSH and MD_CLEAR implicitly enumerate
FB_CLEAR as part of their MD_CLEAR support.
Bit 18 - FB_CLEAR_CTRL - Processor supports read and write to MSR
IA32_MCU_OPT_CTRL[FB_CLEAR_DIS]. On such processors, the FB_CLEAR_DIS
bit can be set to cause the VERW instruction to not perform the
FB_CLEAR action. Not all processors that support FB_CLEAR will support
FB_CLEAR_CTRL.
MSR IA32_MCU_OPT_CTRL
---------------------
Bit 3 - FB_CLEAR_DIS - When set, VERW instruction does not perform the FB_CLEAR
action. This may be useful to reduce the performance impact of FB_CLEAR in
cases where system software deems it warranted (for example, when performance
is more critical, or the untrusted software has no MMIO access). Note that
FB_CLEAR_DIS has no impact on enumeration (for example, it does not change
FB_CLEAR or MD_CLEAR enumeration) and it may not be supported on all processors
that enumerate FB_CLEAR.
Mitigation
==========
Like MDS, all variants of Processor MMIO Stale Data vulnerabilities have the
same mitigation strategy to force the CPU to clear the affected buffers before
an attacker can extract the secrets.
This is achieved by using the otherwise unused and obsolete VERW instruction in
combination with a microcode update. The microcode clears the affected CPU
buffers when the VERW instruction is executed.
Kernel does the buffer clearing with x86_clear_cpu_buffers().
On MDS affected CPUs, the kernel already invokes CPU buffer clear on
kernel/userspace, hypervisor/guest and C-state (idle) transitions. No
additional mitigation is needed on such CPUs.
For CPUs not affected by MDS or TAA, mitigation is needed only for the attacker
with MMIO capability. Therefore, VERW is not required for kernel/userspace. For
virtualization case, VERW is only needed at VMENTER for a guest with MMIO
capability.
Mitigation points
-----------------
Return to user space
^^^^^^^^^^^^^^^^^^^^
Same mitigation as MDS when affected by MDS/TAA, otherwise no mitigation
needed.
C-State transition
^^^^^^^^^^^^^^^^^^
Control register writes by CPU during C-state transition can propagate data
from fill buffer to uncore buffers. Execute VERW before C-state transition to
clear CPU fill buffers.
Guest entry point
^^^^^^^^^^^^^^^^^
Same mitigation as MDS when processor is also affected by MDS/TAA, otherwise
execute VERW at VMENTER only for MMIO capable guests. On CPUs not affected by
MDS/TAA, guest without MMIO access cannot extract secrets using Processor MMIO
Stale Data vulnerabilities, so there is no need to execute VERW for such guests.
Mitigation control on the kernel command line
---------------------------------------------
The kernel command line allows to control the Processor MMIO Stale Data
mitigations at boot time with the option "mmio_stale_data=". The valid
arguments for this option are:
========== =================================================================
full If the CPU is vulnerable, enable mitigation; CPU buffer clearing
on exit to userspace and when entering a VM. Idle transitions are
protected as well. It does not automatically disable SMT.
full,nosmt Same as full, with SMT disabled on vulnerable CPUs. This is the
complete mitigation.
off Disables mitigation completely.
========== =================================================================
If the CPU is affected and mmio_stale_data=off is not supplied on the kernel
command line, then the kernel selects the appropriate mitigation.
Mitigation status information
-----------------------------
The Linux kernel provides a sysfs interface to enumerate the current
vulnerability status of the system: whether the system is vulnerable, and
which mitigations are active. The relevant sysfs file is:
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data
The possible values in this file are:
.. list-table::
* - 'Not affected'
- The processor is not vulnerable
* - 'Vulnerable'
- The processor is vulnerable, but no mitigation enabled
* - 'Vulnerable: Clear CPU buffers attempted, no microcode'
- The processor is vulnerable but microcode is not updated. The
mitigation is enabled on a best effort basis.
If the processor is vulnerable but the availability of the microcode
based mitigation mechanism is not advertised via CPUID, the kernel
selects a best effort mitigation mode. This mode invokes the mitigation
instructions without a guarantee that they clear the CPU buffers.
This is done to address virtualization scenarios where the host has the
microcode update applied, but the hypervisor is not yet updated to
expose the CPUID to the guest. If the host has updated microcode the
protection takes effect; otherwise a few CPU cycles are wasted
pointlessly.
* - 'Mitigation: Clear CPU buffers'
- The processor is vulnerable and the CPU buffer clearing mitigation is
enabled.
* - 'Unknown: No mitigations'
- The processor vulnerability status is unknown because it is
out of Servicing period. Mitigation is not attempted.
Definitions:
------------
Servicing period: The process of providing functional and security updates to
Intel processors or platforms, utilizing the Intel Platform Update (IPU)
process or other similar mechanisms.
End of Servicing Updates (ESU): ESU is the date at which Intel will no
longer provide Servicing, such as through IPU or other similar update
processes. ESU dates will typically be aligned to end of quarter.
If the processor is vulnerable then the following information is appended to
the above information:
======================== ===========================================
'SMT vulnerable' SMT is enabled
'SMT disabled' SMT is disabled
'SMT Host state unknown' Kernel runs in a VM, Host SMT state unknown
======================== ===========================================
References
----------
.. [#f1] Affected Processors
https://www.intel.com/content/www/us/en/developer/topic-technology/software-security-guidance/processors-affected-consolidated-product-cpu-model.html
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Processor MMIO Stale Data 개요
1-18Processor MMIO Stale Data는 data를 노출할 수 있는 memory-mapped I/O(MMIO) 취약점 계열입니다. 노출을 일으키는 operation sequence는 단순한 것부터 매우 복잡한 것까지 다양합니다. 대부분 공격자가 MMIO에 access해야 하므로 많은 환경은 영향을 받지 않지만, 신뢰할 수 없는 guest에 MMIO access를 제공하는 virtualization 환경은 완화가 필요할 수 있습니다.
이 취약점 자체는 transient-execution attack이 아닙니다. 다만 오래된 data를 core fill buffer로 전달할 수 있고, 이후 완화되지 않은 transient-execution attack이 그 data를 추론할 수 있습니다.
완화는 platform과 사용 모델에 따라 microcode update와 software 변경을 결합합니다. 일부 완화는 MDS 또는 SRBDS 완화와 유사합니다.
세 가지 stale-data propagator
19-52propagator는 오래된 data가 한 microarchitectural buffer 또는 register에서 다른 곳으로 복사·이동되게 하는 operation입니다. Processor MMIO Stale Data 취약점은 오래된 data가 architectural software-visible state로 직접 읽히거나 buffer·register에서 sampling되게 할 수 있습니다.
| propagator | 동작 |
|---|---|
| Fill Buffer Stale Data Propagator (FBSDP) | 일부 non-coherent write에서 fill buffer(FB)의 오래된 data가 uncore의 non-coherent 부분으로 전달될 수 있습니다. 자체로는 architectural visibility를 만들지 않으며 읽기나 sampling이 가능한 위치로 추가 전달되어야 합니다. |
| Sideband Stale Data Propagator (SSDP) | client uncore(Intel Xeon server E3 포함)에 한정됩니다. 모든 client core가 공유하는 sideband response buffer와 transaction buffer에서 요청 data 및 요청하지 않은 오래된 data를 포함한 64 byte가 core로 반환되어 core fill buffer에 남을 수 있습니다. |
| Primary Stale Data Propagator (PSDP) | client uncore에 한정되며 primary response buffer를 모든 client core가 공유합니다. 일부 프로세서의 MMIO primary read는 요청 data와 오래된 data를 포함한 64 byte를 core fill buffer로 반환합니다. |
DRPW·SBDS·SBDR 취약점
53-76| 취약점 | CVE | 설명 |
|---|---|---|
| Device Register Partial Write (DRPW) | CVE-2022-21166 | 일부 endpoint MMIO register가 register size보다 작은 write를 잘못 처리합니다. write를 중단하거나 지정 byte만 복사하지 않고 더 많은 byte를 register에 써서 FBSDP 영향 프로세서에서는 write transaction을 만든 core fill buffer의 오래된 data가 노출될 수 있습니다. |
| Shared Buffers Data Sampling (SBDS) | CVE-2022-21125 | propagator가 uncore의 data를 옮겨 client core fill buffer에 복사한 뒤, MFBDS 영향 프로세서가 fill buffer data를 누출할 수 있습니다. client uncore에 한정됩니다. |
| Shared Buffers Data Read (SBDR) | CVE-2022-21123 | SBDS와 비슷하지만 data가 architectural software-visible state로 직접 읽힙니다. client uncore에 한정됩니다. |
영향받는 프로세서
77-112모든 CPU가 모든 변형의 영향을 받는 것은 아닙니다. 예를 들어 Intel Xeon E3를 제외한 server 시장용 프로세서 대부분은 DRPW에만 영향을 받습니다. 영향받는 Intel 프로세서는 다음과 같습니다 `[#f1]_`.
| Common name | Family_Model | Steppings |
|---|---|---|
| HASWELL_X | 06_3FH | 2,4 |
| SKYLAKE_L | 06_4EH | 3 |
| BROADWELL_X | 06_4FH | All |
| SKYLAKE_X | 06_55H | 3,4,6,7,11 |
| BROADWELL_D | 06_56H | 3,4,5 |
| SKYLAKE | 06_5EH | 3 |
| ICELAKE_X | 06_6AH | 4,5,6 |
| ICELAKE_D | 06_6CH | 1 |
| ICELAKE_L | 06_7EH | 5 |
| ATOM_TREMONT_D | 06_86H | All |
| LAKEFIELD | 06_8AH | 1 |
| KABYLAKE_L | 06_8EH | 9 to 12 |
| ATOM_TREMONT | 06_96H | 1 |
| ATOM_TREMONT_L | 06_9CH | 0 |
| KABYLAKE | 06_9EH | 9 to 13 |
| COMETLAKE | 06_A5H | 2,3,5 |
| COMETLAKE_L | 06_A6H | 0,1 |
| ROCKETLAKE | 06_A7H | 1 |
목록에 있지만 특정 변형의 영향을 받지 않는 CPU는 `MSR IA32_ARCH_CAPABILITIES`의 새 bit로 표시됩니다. 모든 변형의 완화는 대체로 `VERW`로 CPU fill buffer를 지우는 방식입니다.
IA32_ARCH_CAPABILITIES와 IA32_MCU_OPT_CTRL
113-149새 프로세서와 기존 영향 프로세서용 microcode update에는 변형별 취약 여부와 완화 capability를 열거하는 bit가 추가되었습니다.
| MSR bit | 의미 |
|---|---|
| IA32_ARCH_CAPABILITIES bit 13 - SBDR_SSDP_NO | 설정되면 SBDR과 SSDP 양쪽의 영향을 받지 않습니다. |
| IA32_ARCH_CAPABILITIES bit 14 - FBSDP_NO | 설정되면 FBSDP의 영향을 받지 않습니다. |
| IA32_ARCH_CAPABILITIES bit 15 - PSDP_NO | 설정되면 PSDP의 영향을 받지 않습니다. |
| IA32_ARCH_CAPABILITIES bit 17 - FB_CLEAR | `VERW`가 MD_CLEAR 작업의 일부로 CPU fill-buffer 값을 덮어씁니다. MDS_NO는 없지만 L1D_FLUSH와 MD_CLEAR를 모두 지원하는 CPU는 MD_CLEAR 지원에 FB_CLEAR도 암시적으로 포함합니다. |
| IA32_ARCH_CAPABILITIES bit 18 - FB_CLEAR_CTRL | `IA32_MCU_OPT_CTRL[FB_CLEAR_DIS]` read/write를 지원합니다. 이 bit로 VERW의 FB_CLEAR 동작을 끌 수 있습니다. |
| IA32_MCU_OPT_CTRL bit 3 - FB_CLEAR_DIS | 설정되면 `VERW`가 FB_CLEAR를 수행하지 않습니다. 성능이 더 중요하거나 untrusted software에 MMIO access가 없을 때 비용을 줄일 수 있습니다. FB_CLEAR 또는 MD_CLEAR 열거 값은 바꾸지 않습니다. |
FB_CLEAR를 지원하는 모든 프로세서가 FB_CLEAR_CTRL 또는 FB_CLEAR_DIS를 지원하는 것은 아닙니다.
완화 전략
150-170MDS와 마찬가지로 모든 Processor MMIO Stale Data 변형은 공격자가 secret을 추출하기 전에 영향을 받는 buffer를 CPU가 지우도록 강제합니다. obsolete인 `VERW` 명령을 microcode update와 함께 사용하며, 커널은 `x86_clear_cpu_buffers()`로 buffer clearing을 수행합니다.
MDS 영향 CPU에서는 커널이 이미 kernel/userspace, hypervisor/guest, C-state(idle) transition에서 CPU buffer를 지우므로 추가 완화가 필요 없습니다.
MDS나 TAA의 영향을 받지 않는 CPU에서는 MMIO capability를 가진 공격자에 대해서만 완화가 필요합니다. kernel/userspace 전환에는 `VERW`가 필요 없고, virtualization에서는 MMIO capability를 가진 guest에 VMENTER할 때만 필요합니다.
완화 적용 지점
171-190| 지점 | 동작 |
|---|---|
| Return to userspace | MDS/TAA의 영향을 받으면 MDS와 같은 완화를 적용하고, 아니면 완화가 필요 없습니다. |
| C-State transition | C-state 전환 중 CPU의 control-register write가 fill buffer data를 uncore buffer로 전달할 수 있으므로 전환 전에 `VERW`를 실행해 CPU fill buffer를 지웁니다. |
| Guest entry point | MDS/TAA 영향 CPU는 MDS와 같은 완화를 사용합니다. 그 외에는 MMIO-capable guest에 VMENTER할 때만 `VERW`를 실행합니다. MMIO access가 없는 guest는 secret을 추출할 수 없습니다. |
mmio_stale_data= 제어
191-208boot time의 완화는 `mmio_stale_data=` kernel command-line option으로 제어합니다.
| argument | 동작 |
|---|---|
| full | CPU가 취약하면 userspace로 나갈 때, VM에 들어갈 때, idle transition에서 CPU buffer clearing을 활성화합니다. SMT를 자동으로 끄지는 않습니다. |
| full,nosmt | `full`과 같고 취약 CPU에서 SMT를 비활성화합니다. 완전한 완화입니다. |
| off | 완화를 완전히 비활성화합니다. |
CPU가 영향을 받고 command line에 `mmio_stale_data=off`가 없으면 커널이 적절한 완화를 선택합니다.
sysfs 완화 상태
209-245Linux 커널은 system의 취약 여부와 활성 완화를 다음 sysfs file로 제공합니다.
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data
| 상태 문자열 | 의미 |
|---|---|
| Not affected | 프로세서가 취약하지 않습니다. |
| Vulnerable | 프로세서가 취약하지만 완화가 활성화되지 않았습니다. |
| Vulnerable: Clear CPU buffers attempted, no microcode | microcode가 없지만 best-effort buffer clearing을 시도합니다. host에는 update가 있고 hypervisor가 CPUID를 아직 노출하지 않은 guest 환경을 보호할 수 있지만, host에도 update가 없으면 CPU cycle만 소비합니다. |
| Mitigation: Clear CPU buffers | CPU buffer clearing 완화가 활성화되어 있습니다. |
| Unknown: No mitigations | 프로세서가 Servicing period를 지나 취약 상태를 알 수 없고 완화도 시도하지 않습니다. |
Servicing 정의와 SMT suffix
246-265Servicing period는 Intel Platform Update(IPU) 또는 유사한 메커니즘으로 Intel processor나 platform에 functional·security update를 제공하는 과정입니다.
End of Servicing Updates (ESU)는 Intel이 IPU 등으로 Servicing을 더 이상 제공하지 않는 날짜이며, 일반적으로 분기 말에 맞춰집니다.
프로세서가 취약하면 다음 정보가 기본 상태 뒤에 붙습니다.
| SMT 상태 | 의미 |
|---|---|
| SMT vulnerable | SMT가 활성화되어 있습니다. |
| SMT disabled | SMT가 비활성화되어 있습니다. |
| SMT Host state unknown | 커널이 VM에서 실행되어 host SMT 상태를 알 수 없습니다. |
참고 자료
266-269`[#f1]` Affected Processors: https://www.intel.com/content/www/us/en/developer/topic-technology/software-security-guidance/processors-affected-consolidated-product-cpu-model.html
propagator와 취약점
processor_mmio_stale_data.rst:1-76FBSDP·SSDP·PSDP와 DRPW·SBDS·SBDR의 data 이동 및 노출 방식을 설명합니다.