diff options
author | Jisheng Zhang <[email protected]> | 2022-10-29 19:34:50 +0800 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2022-11-10 13:43:15 -0800 |
commit | 6510c78490c490a6636e48b61eeaa6fb65981f4b (patch) | |
tree | 65dc7264deb011465dd3ec3e3040e49f7cfe6669 /lib/memory-notifier-error-inject.c | |
parent | 8bc8824d30193eb7755043d5bb65fa7f0d11a595 (diff) |
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: 7db91e57a0ac ("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]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions