riscv: kvm: Fix out-of-bounds array access
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.11.116.12.26.13In the Linux kernel, the following vulnerability has been resolved:
riscv: kvm: Fix out-of-bounds array access
In kvm_riscv_vcpu_sbi_init() the entry->ext_idx can contain an out-of-bound index. This is used as a special marker for the base extensions, that cannot be disabled. However, when traversing the extensions, that special marker is not checked prior indexing the array.
Add an out-of-bounds check to the function.
From the CVE record · Linux
The Linux kernel’s RISC-V KVM code can index an array out of bounds while traversing SBI extensions because it does not check a special extension marker before using it as an index. The input does not specify what an attacker could achieve or whether exploitation requires local access, authentication, or user interaction.
Engineers running Linux kernels with RISC-V KVM should check their installations; affected versions are not specified.