Commit 7997662
RISC-V: KVM: fix stack overrun when loading vlenb
The userspace load can put up to 2048 bits into an xlen bit stack
buffer. We want only xlen bits, so check the size beforehand.
Fixes: 2fa2903 ("RISC-V: KVM: add 'vlenb' Vector CSR")
Cc: [email protected]
Signed-off-by: Radim Krčmář <[email protected]>
Reviewed-by: Nutty Liu <[email protected]>
Reviewed-by: Daniel Henrique Barboza <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Anup Patel <[email protected]>1 parent e61a12a commit 7997662
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
185 | 187 | | |
186 | 188 | | |
187 | 189 | | |
| |||
0 commit comments