요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
VERW와 capability bit
reg-file-data-sampling.rst:33-60`VERW`, `RFDS_NO`, `RFDS_CLEAR`를 이용한 완화와 적용 지점을 설명합니다.
command line과 상태
reg-file-data-sampling.rst:61-96`reg_file_data_sampling=` 제어, sysfs 상태와 참고 자료를 제공합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
==================================
Register File Data Sampling (RFDS)
==================================
Register File Data Sampling (RFDS) is a microarchitectural vulnerability that
only affects Intel Atom parts(also branded as E-cores). RFDS may allow
a malicious actor to infer data values previously used in floating point
registers, vector registers, or integer registers. RFDS does not provide the
ability to choose which data is inferred. CVE-2023-28746 is assigned to RFDS.
Affected Processors
===================
Below is the list of affected Intel processors [#f1]_:
=================== ============
Common name Family_Model
=================== ============
ATOM_GOLDMONT 06_5CH
ATOM_GOLDMONT_D 06_5FH
ATOM_GOLDMONT_PLUS 06_7AH
ATOM_TREMONT_D 06_86H
ATOM_TREMONT 06_96H
ALDERLAKE 06_97H
ALDERLAKE_L 06_9AH
ATOM_TREMONT_L 06_9CH
RAPTORLAKE 06_B7H
RAPTORLAKE_P 06_BAH
ATOM_GRACEMONT 06_BEH
RAPTORLAKE_S 06_BFH
=================== ============
Mitigation
==========
Intel released a microcode update that enables software to clear sensitive
information using the VERW instruction. Like MDS, RFDS deploys 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.
Mitigation points
-----------------
VERW is executed by the kernel before returning to user space, and by KVM
before VMentry. None of the affected cores support SMT, so VERW is not required
at C-state transitions.
New bits in IA32_ARCH_CAPABILITIES
----------------------------------
Newer processors and microcode update on existing affected processors added new
bits to IA32_ARCH_CAPABILITIES MSR. These bits can be used to enumerate
vulnerability and mitigation capability:
- Bit 27 - RFDS_NO - When set, processor is not affected by RFDS.
- Bit 28 - RFDS_CLEAR - When set, processor is affected by RFDS, and has the
microcode that clears the affected buffers on VERW execution.
Mitigation control on the kernel command line
---------------------------------------------
The kernel command line allows to control RFDS mitigation at boot time with the
parameter "reg_file_data_sampling=". The valid arguments are:
========== =================================================================
on If the CPU is vulnerable, enable mitigation; CPU buffer clearing
on exit to userspace and before entering a VM.
off Disables mitigation.
========== =================================================================
Mitigation default is selected by CONFIG_MITIGATION_RFDS.
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/reg_file_data_sampling
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: No microcode'
- The processor is vulnerable but microcode is not updated.
* - 'Mitigation: Clear Register File'
- The processor is vulnerable and the CPU buffer clearing mitigation is
enabled.
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은 원문 표기를 유지합니다.
Register File Data Sampling 개요
1-10Register File Data Sampling(RFDS)은 Intel Atom 계열, 즉 E-core에만 영향을 주는 microarchitectural 취약점입니다. 악의적인 행위자가 floating-point register, vector register 또는 integer register에서 이전에 사용된 data value를 추론할 수 있습니다.
RFDS는 어떤 데이터를 추론할지 선택하는 기능은 제공하지 않습니다. RFDS에는 `CVE-2023-28746`이 할당되었습니다.
영향받는 프로세서
11-32다음 Intel 프로세서가 영향을 받습니다 `[#f1]_`.
| Common name | Family_Model |
|---|---|
| ATOM_GOLDMONT | 06_5CH |
| ATOM_GOLDMONT_D | 06_5FH |
| ATOM_GOLDMONT_PLUS | 06_7AH |
| ATOM_TREMONT_D | 06_86H |
| ATOM_TREMONT | 06_96H |
| ALDERLAKE | 06_97H |
| ALDERLAKE_L | 06_9AH |
| ATOM_TREMONT_L | 06_9CH |
| RAPTORLAKE | 06_B7H |
| RAPTORLAKE_P | 06_BAH |
| ATOM_GRACEMONT | 06_BEH |
| RAPTORLAKE_S | 06_BFH |
VERW 완화와 적용 지점
33-47Intel은 `VERW` 명령으로 민감한 정보를 지울 수 있게 하는 microcode update를 공개했습니다. RFDS는 MDS와 같은 전략을 사용해 공격자가 secret을 추출하기 전에 CPU가 영향을 받는 buffer를 지우도록 강제합니다.
원래 사용되지 않고 obsolete인 `VERW` 명령을 microcode update와 조합하며, `VERW`가 실행되면 microcode가 영향을 받는 CPU buffer를 지웁니다.
커널은 userspace로 돌아가기 전에, KVM은 VMentry 전에 `VERW`를 실행합니다. 영향받는 core는 SMT를 지원하지 않으므로 C-state transition에서는 `VERW`가 필요하지 않습니다.
IA32_ARCH_CAPABILITIES의 새 bit
48-60새 프로세서와 기존 영향 프로세서용 microcode update에는 취약점과 완화 capability를 열거하는 `IA32_ARCH_CAPABILITIES` MSR bit가 추가되었습니다.
| bit | 이름 | 의미 |
|---|---|---|
| 27 | RFDS_NO | 설정되면 프로세서가 RFDS의 영향을 받지 않습니다. |
| 28 | RFDS_CLEAR | 설정되면 프로세서가 RFDS의 영향을 받지만 VERW 실행 때 영향을 받는 buffer를 지우는 microcode가 있습니다. |
kernel command line 제어
61-73boot time의 RFDS 완화는 `reg_file_data_sampling=` parameter로 제어합니다.
| argument | 동작 |
|---|---|
| on | CPU가 취약하면 userspace로 나갈 때와 VM에 들어가기 전에 CPU buffer clearing을 수행합니다. |
| off | 완화를 비활성화합니다. |
기본 완화는 `CONFIG_MITIGATION_RFDS`가 선택합니다.
RFDS sysfs 상태
74-91Linux 커널은 system의 취약 여부와 활성 완화를 다음 sysfs file로 제공합니다.
/sys/devices/system/cpu/vulnerabilities/reg_file_data_sampling
| 상태 문자열 | 의미 |
|---|---|
| Not affected | 프로세서가 취약하지 않습니다. |
| Vulnerable | 프로세서가 취약하지만 완화가 활성화되지 않았습니다. |
| Vulnerable: No microcode | 프로세서가 취약하지만 microcode가 업데이트되지 않았습니다. |
| Mitigation: Clear Register File | 프로세서가 취약하며 CPU buffer clearing 완화가 활성화되었습니다. |
참고 자료
92-96`[#f1]` Affected Processors: https://www.intel.com/content/www/us/en/developer/topic-technology/software-security-guidance/processors-affected-consolidated-product-cpu-model.html
영향 범위
reg-file-data-sampling.rst:1-32RFDS가 sampling할 수 있는 register와 영향받는 Family_Model을 정리합니다.