]> git.baikalelectronics.ru Git - kernel.git/commit
riscv/mm: Prevent kernel module to access user memory without uaccess routines
authorEric Lin <tesheng@andestech.com>
Fri, 4 Dec 2020 05:42:59 +0000 (13:42 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Fri, 8 Jan 2021 01:19:19 +0000 (17:19 -0800)
commit4764f746466481dc112f28c6e4b86f894019beb8
tree394a5c31efdb214467a3988bb9292cd46ff69b36
parent767b0f6a46b06a992c46aad619594a9f6724d1cf
riscv/mm: Prevent kernel module to access user memory without uaccess routines

We found this issue in an legacy out-of-tree kernel module
which didn't properly access user space pointer by get/put_user().
Such an illegal access loops in the page fault handler.
To resolve this, let it die here.

Signed-off-by: Eric Lin <tesheng@andestech.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/mm/fault.c