linux-stable/arch/x86
Zhenzhong Duan 5c49d1850d KVM: VMX: Fix a TSX_CTRL_CPUID_CLEAR field mask issue
When updating the host's mask for its MSR_IA32_TSX_CTRL user return entry,
clear the mask in the found uret MSR instead of vmx->guest_uret_msrs[i].
Modifying guest_uret_msrs directly is completely broken as 'i' does not
point at the MSR_IA32_TSX_CTRL entry.  In fact, it's guaranteed to be an
out-of-bounds accesses as is always set to kvm_nr_uret_msrs in a prior
loop. By sheer dumb luck, the fallout is limited to "only" failing to
preserve the host's TSX_CTRL_CPUID_CLEAR.  The out-of-bounds access is
benign as it's guaranteed to clear a bit in a guest MSR value, which are
always zero at vCPU creation on both x86-64 and i386.

Cc: stable@vger.kernel.org
Fixes: 8ea8b8d6f8 ("KVM: VMX: Use common x86's uret MSR list as the one true list")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210926015545.281083-1-zhenzhong.duan@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-09-27 11:25:40 -04:00
..
boot Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
configs configs: remove the obsolete CONFIG_INPUT_POLLDEV 2021-09-08 11:50:28 -07:00
crypto crypto: aesni - xts_crypt() return if walk.nbytes is 0 2021-08-27 16:30:19 +08:00
entry compat: remove some compat entry points 2021-09-08 15:32:35 -07:00
events perf/x86/amd/ibs: Add bitfield definitions in new <asm/amd-ibs.h> header 2021-08-26 09:14:36 +02:00
hyperv hyperv-fixes for 5.15-rc2 2021-09-15 17:18:56 -07:00
ia32 binfmt: remove in-tree usage of MAP_DENYWRITE 2021-09-03 18:42:01 +02:00
include KVM: x86: Handle SRCU initialization failure during page track init 2021-09-22 10:33:09 -04:00
kernel A set of x86 fixes: 2021-09-19 13:29:36 -07:00
kvm KVM: VMX: Fix a TSX_CTRL_CPUID_CLEAR field mask issue 2021-09-27 11:25:40 -04:00
lib x86: Add support for 0x22/0x23 port I/O configuration space 2021-08-10 23:31:43 +02:00
math-emu x86/math-emu: Rename frstor() 2021-06-23 18:16:33 +02:00
mm A set of x86 fixes: 2021-09-19 13:29:36 -07:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-07-31 09:14:46 -07:00
pci pci-v5.15-changes 2021-09-07 19:13:42 -07:00
platform EFI changes: two driver API cleanups, and a log message tweak. 2021-06-28 11:34:16 -07:00
power x86/power: Fix kernel-doc warnings in cpu.c 2021-08-12 10:15:40 +02:00
purgatory kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
ras
realmode memblock: make memblock_find_in_range method private 2021-09-03 09:58:17 -07:00
tools - Remove cc-option checks which are old and already supported by the 2021-08-30 13:27:16 -07:00
um um: fix stub location calculation 2021-08-26 22:28:03 +02:00
video
xen xen: fix usage of pmd_populate in mremap for pv guests 2021-09-15 08:42:04 +02:00
.gitignore
Kbuild
Kconfig A set of x86 fixes: 2021-09-19 13:29:36 -07:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
Makefile.um um: allow not setting extra rpaths in the linux binary 2021-06-17 21:54:15 +02:00
Makefile_32.cpu x86/build: Do not add -falign flags unconditionally for clang 2021-09-19 10:35:53 +09:00