[PATCH 6.12 404/826] riscv: kvm: Fix out-of-bounds array access