1 .. SPDX-License-Identifier: GPL-2.0
3 SRBDS - Special Register Buffer Data Sampling
4 =============================================
6 SRBDS is a hardware vulnerability that allows MDS
7 Documentation/admin-guide/hw-vuln/mds.rst techniques to
8 infer values returned from special register accesses. Special register
9 accesses are accesses to off core registers. According to Intel's evaluation,
10 the special register reads that have a security expectation of privacy are
11 RDRAND, RDSEED and SGX EGETKEY.
13 When RDRAND, RDSEED and EGETKEY instructions are used, the data is moved
14 to the core through the special register mechanism that is susceptible
19 Core models (desktop, mobile, Xeon-E3) that implement RDRAND and/or RDSEED may
22 A processor is affected by SRBDS if its Family_Model and stepping is
23 in the following list, with the exception of the listed processors
24 exporting MDS_NO while Intel TSX is available yet not enabled. The
25 latter class of processors are only affected when Intel TSX is enabled
26 by software using TSX_CTRL_MSR otherwise they are not affected.
28 ============= ============ ========
29 common name Family_Model Stepping
30 ============= ============ ========
37 Broadwell_G 06_47H All
43 Kabylake_L 06_8EH <= 0xC
44 Kabylake 06_9EH <= 0xD
45 ============= ============ ========
50 The following CVE entry is related to this SRBDS issue:
52 ============== ===== =====================================
53 CVE-2020-0543 SRBDS Special Register Buffer Data Sampling
54 ============== ===== =====================================
58 An unprivileged user can extract values returned from RDRAND and RDSEED
59 executed on another core or sibling thread using MDS techniques.
64 Intel will release microcode updates that modify the RDRAND, RDSEED, and
65 EGETKEY instructions to overwrite secret special register data in the shared
66 staging buffer before the secret data can be accessed by another logical
69 During execution of the RDRAND, RDSEED, or EGETKEY instructions, off-core
70 accesses from other logical processors will be delayed until the special
71 register read is complete and the secret data in the shared staging buffer is
74 This has three effects on performance:
76 #. RDRAND, RDSEED, or EGETKEY instructions have higher latency.
78 #. Executing RDRAND at the same time on multiple logical processors will be
79 serialized, resulting in an overall reduction in the maximum RDRAND
82 #. Executing RDRAND, RDSEED or EGETKEY will delay memory accesses from other
83 logical processors that miss their core caches, with an impact similar to
84 legacy locked cache-line-split accesses.
86 The microcode updates provide an opt-out mechanism (RNGDS_MITG_DIS) to disable
87 the mitigation for RDRAND and RDSEED instructions executed outside of Intel
88 Software Guard Extensions (Intel SGX) enclaves. On logical processors that
89 disable the mitigation using this opt-out mechanism, RDRAND and RDSEED do not
90 take longer to execute and do not impact performance of sibling logical
91 processors memory accesses. The opt-out mechanism does not affect Intel SGX
92 enclaves (including execution of RDRAND or RDSEED inside an enclave, as well
93 as EGETKEY execution).
95 IA32_MCU_OPT_CTRL MSR Definition
96 --------------------------------
97 Along with the mitigation for this issue, Intel added a new thread-scope
98 IA32_MCU_OPT_CTRL MSR, (address 0x123). The presence of this MSR and
99 RNGDS_MITG_DIS (bit 0) is enumerated by CPUID.(EAX=07H,ECX=0).EDX[SRBDS_CTRL =
100 9]==1. This MSR is introduced through the microcode update.
102 Setting IA32_MCU_OPT_CTRL[0] (RNGDS_MITG_DIS) to 1 for a logical processor
103 disables the mitigation for RDRAND and RDSEED executed outside of an Intel SGX
104 enclave on that logical processor. Opting out of the mitigation for a
105 particular logical processor does not affect the RDRAND and RDSEED mitigations
106 for other logical processors.
108 Note that inside of an Intel SGX enclave, the mitigation is applied regardless
109 of the value of RNGDS_MITG_DS.
111 Mitigation control on the kernel command line
112 ---------------------------------------------
113 The kernel command line allows control over the SRBDS mitigation at boot time
114 with the option "srbds=". The option for this is:
116 ============= =============================================================
117 off This option disables SRBDS mitigation for RDRAND and RDSEED on
119 ============= =============================================================
121 SRBDS System Information
122 ------------------------
123 The Linux kernel provides vulnerability status information through sysfs. For
124 SRBDS this can be accessed by the following sysfs file:
125 /sys/devices/system/cpu/vulnerabilities/srbds
127 The possible values contained in this file are:
129 ============================== =============================================
130 Not affected Processor not vulnerable
131 Vulnerable Processor vulnerable and mitigation disabled
132 Vulnerable: No microcode Processor vulnerable and microcode is missing
134 Mitigation: Microcode Processor is vulnerable and mitigation is in
136 Mitigation: TSX disabled Processor is only vulnerable when TSX is
137 enabled while this system was booted with TSX
139 Unknown: Dependent on
140 hypervisor status Running on virtual guest processor that is
141 affected but with no way to know if host
142 processor is mitigated or vulnerable.
143 ============================== =============================================
145 SRBDS Default mitigation
146 ------------------------
147 This new microcode serializes processor access during execution of RDRAND,
148 RDSEED ensures that the shared buffer is overwritten before it is released for
149 reuse. Use the "srbds=off" kernel command line to disable the mitigation for