Commit c87bd4d
KVM: x86: use array_index_nospec with indices that come from guest
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]>1 parent 8f5ae30 commit c87bd4d
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
| 813 | + | |
| 814 | + | |
813 | 815 | | |
814 | 816 | | |
815 | 817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9908 | 9908 | | |
9909 | 9909 | | |
9910 | 9910 | | |
9911 | | - | |
9912 | | - | |
| 9911 | + | |
| 9912 | + | |
| 9913 | + | |
| 9914 | + | |
| 9915 | + | |
9913 | 9916 | | |
9914 | 9917 | | |
9915 | 9918 | | |
| |||
0 commit comments