linux/arch/riscv/kvm
Radim Krčmář 799766208f RISC-V: KVM: fix stack overrun when loading vlenb
The userspace load can put up to 2048 bits into an xlen bit stack
buffer.  We want only xlen bits, so check the size beforehand.

Fixes: 2fa290372d ("RISC-V: KVM: add 'vlenb' Vector CSR")
Cc: stable@vger.kernel.org
Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
Reviewed-by: Nutty Liu <liujingqi@lanxincomputing.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Link: https://lore.kernel.org/r/20250805104418.196023-4-rkrcmar@ventanamicro.com
Signed-off-by: Anup Patel <anup@brainfault.org>
2025-08-25 10:26:20 +05:30
..
aia.c
aia_aplic.c
aia_device.c RISC-V: KVM: Drop the return value of kvm_riscv_vcpu_aia_init() 2025-07-28 22:27:07 +05:30
aia_imsic.c
gstage.c
Kconfig
main.c
Makefile RISC-V: KVM: Factor-out g-stage page table management 2025-07-28 22:27:30 +05:30
mmu.c RISC-V: KVM: Fix pte settings within kvm_riscv_gstage_ioremap() 2025-08-25 10:26:16 +05:30
nacl.c
tlb.c
trace.h
vcpu.c RISC-V: KVM: Correct kvm_riscv_check_vcpu_requests() comment 2025-08-25 10:26:17 +05:30
vcpu_exit.c
vcpu_fp.c
vcpu_insn.c
vcpu_onereg.c RISC-V: KVM: Fix inclusion of Smnpm in the guest ISA bitmap 2025-07-28 22:27:45 +05:30
vcpu_pmu.c RISC-V: KVM: Disable the kernel perf counter during configure 2025-03-06 09:57:07 +05:30
vcpu_sbi.c
vcpu_sbi_base.c
vcpu_sbi_hsm.c
vcpu_sbi_pmu.c
vcpu_sbi_replace.c
vcpu_sbi_sta.c
vcpu_sbi_system.c
vcpu_sbi_v01.c
vcpu_switch.S
vcpu_timer.c
vcpu_vector.c RISC-V: KVM: fix stack overrun when loading vlenb 2025-08-25 10:26:20 +05:30
vm.c
vmid.c