linux-hardened/virt/kvm/arm/vgic
Andre Przywara 112b0b8f8f KVM: arm/arm64: vgic: Prevent access to invalid SPIs
In our VGIC implementation we limit the number of SPIs to a number
that the userland application told us. Accordingly we limit the
allocation of memory for virtual IRQs to that number.
However in our MMIO dispatcher we didn't check if we ever access an
IRQ beyond that limit, leading to out-of-bound accesses.
Add a test against the number of allocated SPIs in check_region().
Adjust the VGIC_ADDR_TO_INT macro to avoid an actual division, which
is not implemented on ARM(32).

[maz: cleaned-up original patch]

Cc: stable@vger.kernel.org
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2016-11-04 17:56:54 +00:00
..
vgic-init.c arm64: KVM: Use static keys for selecting the GIC backend 2016-09-22 13:21:35 +02:00
vgic-irqfd.c KVM: arm: vgic: Drop build compatibility hack for older kernel versions 2016-09-08 12:53:00 +02:00
vgic-its.c KVM: arm64: ITS: avoid re-mapping LPIs 2016-08-16 19:27:22 +02:00
vgic-kvm-device.c ARM: KVM: Support vgic-v3 2016-09-22 13:22:21 +02:00
vgic-mmio-v2.c KVM: arm/arm64: Fix vGICv2 KVM_DEV_ARM_VGIC_GRP_CPU/DIST_REGS 2016-07-18 18:15:15 +01:00
vgic-mmio-v3.c KVM: arm: vgic: Support 64-bit data manipulation on 32-bit host systems 2016-09-22 13:21:59 +02:00
vgic-mmio.c KVM: arm/arm64: vgic: Prevent access to invalid SPIs 2016-11-04 17:56:54 +00:00
vgic-mmio.h KVM: arm/arm64: vgic: Prevent access to invalid SPIs 2016-11-04 17:56:54 +00:00
vgic-v2.c arm64: KVM: vgic-v2: Enable GICV access from HYP if access from guest is unsafe 2016-09-08 12:53:00 +02:00
vgic-v3.c KVM: arm64: ITS: move ITS registration into first VCPU run 2016-08-15 23:00:21 +02:00
vgic.c KVM: arm/arm64: vgic: Don't flush/sync without a working vgic 2016-09-27 18:57:35 +02:00
vgic.h ARM: KVM: Support vgic-v3 2016-09-22 13:22:21 +02:00