Commit 6510c78
riscv: process: fix kernel info leakage
thread_struct's s[12] may contain random kernel memory content, which
may be finally leaked to userspace. This is a security hole. Fix it
by clearing the s[12] array in thread_struct when fork.
As for kthread case, it's better to clear the s[12] array as well.
Fixes: 7db91e5 ("RISC-V: Task implementation")
Signed-off-by: Jisheng Zhang <[email protected]>
Tested-by: Guo Ren <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Guo Ren <[email protected]>
Link: https://lore.kernel.org/r/CAJF2gTSdVyAaM12T%[email protected]/
Signed-off-by: Palmer Dabbelt <[email protected]>1 parent 8bc8824 commit 6510c78
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
167 | 169 | | |
168 | 170 | | |
169 | 171 | | |
| |||
0 commit comments