linux/arch/arm64
Oliver Upton 12c2759ab1 KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache
commit ad362fe07f upstream.

There is a potential UAF scenario in the case of an LPI translation
cache hit racing with an operation that invalidates the cache, such
as a DISCARD ITS command. The root of the problem is that
vgic_its_check_cache() does not elevate the refcount on the vgic_irq
before dropping the lock that serializes refcount changes.

Have vgic_its_check_cache() raise the refcount on the returned vgic_irq
and add the corresponding decrement after queueing the interrupt.

Cc: stable@vger.kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240104183233.3560639-1-oliver.upton@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-25 14:52:49 -08:00
..
boot arm64: dts: qcom: sc7280: Mark SDHCI hosts as cache-coherent 2024-01-25 14:52:39 -08:00
configs arm64: defconfig: build imx-sdma as a module 2022-04-08 14:24:00 +02:00
crypto crypto: arm64/gcm - Select AEAD for GHASH_ARM64_CE 2022-08-17 14:23:26 +02:00
hyperv arm64: hyperv: Initialize hypervisor on boot 2021-08-04 16:54:36 +00:00
include arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify 2023-12-20 15:17:41 +01:00
kernel arm64: armv8_deprecated: fix unused-function error 2023-10-19 23:05:38 +02:00
kvm KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache 2024-01-25 14:52:49 -08:00
lib arm64: csum: Fix OoB access in IP checksum code for negative lengths 2023-09-19 12:22:51 +02:00
mm arm64/mm: mark private VM_FAULT_X defines as vm_fault_t 2023-06-09 10:32:25 +02:00
net bpf, arm64: Use emit_addr_mov_i64() for BPF_PSEUDO_FUNC 2022-07-12 16:34:54 +02:00
tools arm64: errata: Add detection for TRBE write to out-of-range 2023-08-11 15:13:48 +02:00
xen
Kbuild arm64: hyperv: Add Hyper-V hypercall and register access utilities 2021-08-04 16:54:36 +00:00
Kconfig arm64: Restrict CPU_BIG_ENDIAN to GNU as or LLVM IAS 15.x or newer 2023-11-28 16:56:28 +00:00
Kconfig.debug
Kconfig.platforms irqchip/exiu: Fix acknowledgment of edge triggered interrupts 2022-06-09 10:22:54 +02:00
Makefile arm64 updates for 5.15: 2021-09-01 15:04:29 -07:00