RISC-V: KVM: fix stack overrun when loading vlenb
commit 79976620 upstream. 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: 2fa29037 ("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> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please sign in to comment