[PW_SID:1060662] KVM: riscv: Fix Spectre-v1 vulnerabilities in register access#1542
[PW_SID:1060662] KVM: riscv: Fix Spectre-v1 vulnerabilities in register access#1542linux-riscv-bot wants to merge 4 commits into
Conversation
User-controlled register indices from the ONE_REG ioctl are used to index into arrays of register values. Sanitize them with array_index_nospec() to prevent speculative out-of-bounds access. Reviewed-by: Radim Krčmář <radim.krcmar@oss.qualcomm.com> Signed-off-by: Lukas Gerlach <lukas.gerlach@cispa.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
User-controlled indices are used to access AIA CSR registers. Sanitize them with array_index_nospec() to prevent speculative out-of-bounds access. Similar to x86 commit 8c86405 ("KVM: x86: Protect ioapic_read_indirect() from Spectre-v1/L1TF attacks") and arm64 commit 41b8759 ("KVM: arm/arm64: vgic: fix possible spectre-v1 in vgic_get_irq()"). Reviewed-by: Radim Krčmář <radim.krcmar@oss.qualcomm.com> Signed-off-by: Lukas Gerlach <lukas.gerlach@cispa.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
User-controlled indices are used to index into floating-point registers. Sanitize them with array_index_nospec() to prevent speculative out-of-bounds access. Reviewed-by: Radim Krčmář <radim.krcmar@oss.qualcomm.com> Signed-off-by: Lukas Gerlach <lukas.gerlach@cispa.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Guest-controlled counter indices received via SBI ecalls are used to index into the PMC array. Sanitize them with array_index_nospec() to prevent speculative out-of-bounds access. Similar to x86 commit 13c5183 ("KVM: x86: Protect MSR-based index computations in pmu.h from Spectre-v1/L1TF attacks"). Fixes: 8f0153e ("RISC-V: KVM: Add skeleton support for perf") Reviewed-by: Radim Krčmář <radim.krcmar@oss.qualcomm.com> Signed-off-by: Lukas Gerlach <lukas.gerlach@cispa.de> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v2,1/4] KVM: riscv: Fix Spectre-v1 in ONE_REG register access" |
|
Patch 1: "[v2,1/4] KVM: riscv: Fix Spectre-v1 in ONE_REG register access" |
|
Patch 1: "[v2,1/4] KVM: riscv: Fix Spectre-v1 in ONE_REG register access" |
|
Patch 1: "[v2,1/4] KVM: riscv: Fix Spectre-v1 in ONE_REG register access" |
|
Patch 1: "[v2,1/4] KVM: riscv: Fix Spectre-v1 in ONE_REG register access" |
|
Patch 1: "[v2,1/4] KVM: riscv: Fix Spectre-v1 in ONE_REG register access" |
|
Patch 1: "[v2,1/4] KVM: riscv: Fix Spectre-v1 in ONE_REG register access" |
|
Patch 1: "[v2,1/4] KVM: riscv: Fix Spectre-v1 in ONE_REG register access" |
|
Patch 1: "[v2,1/4] KVM: riscv: Fix Spectre-v1 in ONE_REG register access" |
|
Patch 1: "[v2,1/4] KVM: riscv: Fix Spectre-v1 in ONE_REG register access" |
|
Patch 1: "[v2,1/4] KVM: riscv: Fix Spectre-v1 in ONE_REG register access" |
|
Patch 1: "[v2,1/4] KVM: riscv: Fix Spectre-v1 in ONE_REG register access" |
|
Patch 2: "[v2,2/4] KVM: riscv: Fix Spectre-v1 in AIA CSR access" |
|
Patch 2: "[v2,2/4] KVM: riscv: Fix Spectre-v1 in AIA CSR access" |
|
Patch 2: "[v2,2/4] KVM: riscv: Fix Spectre-v1 in AIA CSR access" |
|
Patch 2: "[v2,2/4] KVM: riscv: Fix Spectre-v1 in AIA CSR access" |
|
Patch 2: "[v2,2/4] KVM: riscv: Fix Spectre-v1 in AIA CSR access" |
|
Patch 2: "[v2,2/4] KVM: riscv: Fix Spectre-v1 in AIA CSR access" |
|
Patch 2: "[v2,2/4] KVM: riscv: Fix Spectre-v1 in AIA CSR access" |
|
Patch 2: "[v2,2/4] KVM: riscv: Fix Spectre-v1 in AIA CSR access" |
|
Patch 2: "[v2,2/4] KVM: riscv: Fix Spectre-v1 in AIA CSR access" |
|
Patch 2: "[v2,2/4] KVM: riscv: Fix Spectre-v1 in AIA CSR access" |
|
Patch 2: "[v2,2/4] KVM: riscv: Fix Spectre-v1 in AIA CSR access" |
|
Patch 2: "[v2,2/4] KVM: riscv: Fix Spectre-v1 in AIA CSR access" |
|
Patch 3: "[v2,3/4] KVM: riscv: Fix Spectre-v1 in floating-point register access" |
|
Patch 3: "[v2,3/4] KVM: riscv: Fix Spectre-v1 in floating-point register access" |
|
Patch 3: "[v2,3/4] KVM: riscv: Fix Spectre-v1 in floating-point register access" |
|
Patch 3: "[v2,3/4] KVM: riscv: Fix Spectre-v1 in floating-point register access" |
|
Patch 3: "[v2,3/4] KVM: riscv: Fix Spectre-v1 in floating-point register access" |
|
Patch 3: "[v2,3/4] KVM: riscv: Fix Spectre-v1 in floating-point register access" |
|
Patch 3: "[v2,3/4] KVM: riscv: Fix Spectre-v1 in floating-point register access" |
|
Patch 3: "[v2,3/4] KVM: riscv: Fix Spectre-v1 in floating-point register access" |
|
Patch 3: "[v2,3/4] KVM: riscv: Fix Spectre-v1 in floating-point register access" |
|
Patch 3: "[v2,3/4] KVM: riscv: Fix Spectre-v1 in floating-point register access" |
|
Patch 3: "[v2,3/4] KVM: riscv: Fix Spectre-v1 in floating-point register access" |
|
Patch 3: "[v2,3/4] KVM: riscv: Fix Spectre-v1 in floating-point register access" |
|
Patch 4: "[v2,4/4] KVM: riscv: Fix Spectre-v1 in PMU counter access" |
|
Patch 4: "[v2,4/4] KVM: riscv: Fix Spectre-v1 in PMU counter access" |
|
Patch 4: "[v2,4/4] KVM: riscv: Fix Spectre-v1 in PMU counter access" |
|
Patch 4: "[v2,4/4] KVM: riscv: Fix Spectre-v1 in PMU counter access" |
|
Patch 4: "[v2,4/4] KVM: riscv: Fix Spectre-v1 in PMU counter access" |
|
Patch 4: "[v2,4/4] KVM: riscv: Fix Spectre-v1 in PMU counter access" |
|
Patch 4: "[v2,4/4] KVM: riscv: Fix Spectre-v1 in PMU counter access" |
|
Patch 4: "[v2,4/4] KVM: riscv: Fix Spectre-v1 in PMU counter access" |
|
Patch 4: "[v2,4/4] KVM: riscv: Fix Spectre-v1 in PMU counter access" |
|
Patch 4: "[v2,4/4] KVM: riscv: Fix Spectre-v1 in PMU counter access" |
|
Patch 4: "[v2,4/4] KVM: riscv: Fix Spectre-v1 in PMU counter access" |
|
Patch 4: "[v2,4/4] KVM: riscv: Fix Spectre-v1 in PMU counter access" |
PR for series 1060662 applied to workflow__riscv__fixes
Name: KVM: riscv: Fix Spectre-v1 vulnerabilities in register access
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1060662
Version: 2