Skip to content

Commit 18032b4

Browse files
jsmattsonjrIngo Molnar
authored andcommitted
x86/fpu/xstate: Fix PKRU covert channel
When XCR0[9] is set, PKRU can be read and written from userspace with XSAVE and XRSTOR, even when CR4.PKE is clear. Clear XCR0[9] when protection keys are disabled. Reported-by: Tavis Ormandy <[email protected]> Signed-off-by: Jim Mattson <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Dave Hansen <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d87e89c commit 18032b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/fpu/xstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static unsigned short xsave_cpuid_features[] __initdata = {
7171
[XFEATURE_ZMM_Hi256] = X86_FEATURE_AVX512F,
7272
[XFEATURE_Hi16_ZMM] = X86_FEATURE_AVX512F,
7373
[XFEATURE_PT_UNIMPLEMENTED_SO_FAR] = X86_FEATURE_INTEL_PT,
74-
[XFEATURE_PKRU] = X86_FEATURE_PKU,
74+
[XFEATURE_PKRU] = X86_FEATURE_OSPKE,
7575
[XFEATURE_PASID] = X86_FEATURE_ENQCMD,
7676
[XFEATURE_XTILE_CFG] = X86_FEATURE_AMX_TILE,
7777
[XFEATURE_XTILE_DATA] = X86_FEATURE_AMX_TILE,

0 commit comments

Comments
 (0)