summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kernel/vdso
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2022-10-29 13:34:50 +0200
committerPalmer Dabbelt <palmer@rivosinc.com>2022-11-10 22:43:15 +0100
commit6510c78490c490a6636e48b61eeaa6fb65981f4b (patch)
tree65dc7264deb011465dd3ec3e3040e49f7cfe6669 /arch/riscv/kernel/vdso
parentriscv: dts: sifive unleashed: Add PWM controlled LEDs (diff)
downloadlinux-6510c78490c490a6636e48b61eeaa6fb65981f4b.tar.xz
linux-6510c78490c490a6636e48b61eeaa6fb65981f4b.zip
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 <jszhang@kernel.org> Tested-by: Guo Ren <guoren@kernel.org> Link: https://lore.kernel.org/r/20221029113450.4027-1-jszhang@kernel.org Reviewed-by: Guo Ren <guoren@kernel.org> Link: https://lore.kernel.org/r/CAJF2gTSdVyAaM12T%2B7kXAdRPGS4VyuO08X1c7paE-n4Fr8OtRA@mail.gmail.com/ Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/kernel/vdso')
0 files changed, 0 insertions, 0 deletions