Commit 72777fc
KVM: x86: use array_index_nospec with indices that come from guest
commit c87bd4d upstream.
min and dest_id are guest-controlled indices. Using array_index_nospec()
after the bounds checks clamps these values to mitigate speculative execution
side-channels.
Signed-off-by: Thijs Raymakers <[email protected]>
Cc: [email protected]
Cc: Sean Christopherson <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Fixes: 7150629 ("KVM: X86: Implement PV sched yield hypercall")
Fixes: bdf7ffc ("KVM: LAPIC: Fix pv ipis out-of-bounds access")
Fixes: 4180bf1 ("KVM: X86: Implement "send IPI" hypercall")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 0f63fba commit 72777fc
2 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
592 | 595 | | |
593 | 596 | | |
594 | 597 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7506 | 7506 | | |
7507 | 7507 | | |
7508 | 7508 | | |
7509 | | - | |
7510 | | - | |
| 7509 | + | |
| 7510 | + | |
| 7511 | + | |
| 7512 | + | |
| 7513 | + | |
7511 | 7514 | | |
7512 | 7515 | | |
7513 | 7516 | | |
| |||
0 commit comments