diff options
author | Radim Krčmář <rkrcmar@ventanamicro.com> | 2025-08-05 12:44:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-09-04 15:31:52 +0200 |
commit | c76bf8359188a11f8fd790e5bbd6077894a245cc (patch) | |
tree | f5b590d97566a55cde87daed83def118f3a61cb7 /arch/x86/kernel/cpu/microcode/amd.c | |
parent | 67a05679621b7f721bdba37a5d18665d3aceb695 (diff) |
RISC-V: KVM: fix stack overrun when loading vlenb
commit 799766208f09f95677a9ab111b93872d414fbad7 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: 2fa290372dfe ("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>
Diffstat (limited to 'arch/x86/kernel/cpu/microcode/amd.c')
0 files changed, 0 insertions, 0 deletions