linux-stable/virt/kvm/arm
Mark Rutland 81d27c6ed6 KVM: arm/arm64: vgic: fix possible spectre-v1 in vgic_mmio_read_apr()
[ Upstream commit 5e1ca5e23b ]

It's possible for userspace to control n. Sanitize n when using it as an
array index.

Note that while it appears that n must be bound to the interval [0,3]
due to the way it is extracted from addr, we cannot guarantee that
compiler transformations (and/or future refactoring) will ensure this is
the case, and given this is a slow path it's better to always perform
the masking.

Found by smatch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-21 04:02:49 +09:00
..
hyp kvm: arm/arm64: vgic-v3: Tighten synchronization for guests using v2 on v3 2018-03-21 12:06:43 +01:00
vgic KVM: arm/arm64: vgic: fix possible spectre-v1 in vgic_mmio_read_apr() 2018-06-21 04:02:49 +09:00
aarch32.c KVM: arm64: Make kvm_condition_valid32() accessible from EL2 2017-06-15 09:44:58 +01:00
arch_timer.c KVM: arm/arm64: Reduce verbosity of KVM init log 2018-03-21 12:06:43 +01:00
arm.c KVM: arm/arm64: Close VMID generation race 2018-05-01 12:58:22 -07:00
mmio.c KVM: Fix stack-out-of-bounds read in write_mmio 2018-01-17 09:45:17 +01:00
mmu.c KVM: arm/arm64: Reduce verbosity of KVM init log 2018-03-21 12:06:43 +01:00
perf.c KVM: arm/arm64: Move shared files to virt/kvm/arm 2017-05-04 13:57:26 +02:00
pmu.c KVM: arm/arm64: PMU: Fix overflow interrupt injection 2017-07-25 14:18:01 +01:00
psci.c arm/arm64: KVM: Add PSCI version selection API 2018-05-01 12:58:27 -07:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00