acrn-kernel/arch/arm64/kvm
Oliver Upton dba788e25f KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache
commit ad362fe07fecf0aba839ff2cc59a3617bd42c33f 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 15:27:44 -08:00
..
hyp arm64: errata: Mitigate Ampere1 erratum AC03_CPU_38 at stage-2 2023-08-03 10:23:54 +02:00
vgic KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache 2024-01-25 15:27:44 -08:00
.gitignore
Kconfig
Makefile
arch_timer.c
arm.c KVM: arm64: vgic: Force vcpu vgic teardown on vcpu destroy 2024-01-01 12:39:08 +00:00
debug.c
fpsimd.c
guest.c clocksource/drivers/arm_arch_timer: limit XGene-1 workaround 2023-11-20 11:52:01 +01:00
handle_exit.c
hypercalls.c KVM: arm64: Use config_lock to protect data ordered against KVM_RUN 2023-05-11 23:03:03 +09:00
inject_fault.c
irq.h
mmio.c
mmu.c KVM: arm64: Retry fault if vma_lookup() results become invalid 2023-05-01 08:26:27 +09:00
pkvm.c
pmu-emul.c KVM: arm64: Use config_lock to protect data ordered against KVM_RUN 2023-05-11 23:03:03 +09:00
pmu.c
psci.c KVM: arm64: Avoid vcpu->mutex v. kvm->lock inversion in CPU_ON 2023-05-11 23:03:03 +09:00
pvtime.c
reset.c KVM: arm64: Avoid lock inversion when setting the VM register width 2023-05-11 23:03:03 +09:00
stacktrace.c
sys_regs.c KVM: arm64: PMU: Restore the guest's EL0 event counting after migration 2023-04-20 12:35:07 +02:00
sys_regs.h
trace.h
trace_arm.h
trace_handle_exit.h
trng.c
va_layout.c
vgic-sys-reg-v3.c
vmid.c