projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd08f10
)
powerpc/mm: Don't log user reads to 0xffffffff
author
Christophe Leroy
<christophe.leroy@c-s.fr>
Mon, 23 Dec 2019 07:54:22 +0000
(07:54 +0000)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Mon, 27 Jan 2020 11:37:24 +0000
(22:37 +1100)
Running vdsotest leaves many times the following log:
[ 79.629901] vdsotest[396]: User access of kernel address (
ffffffff
) - exploit attempt? (uid: 0)
A pointer set to (-1) is likely a programming error similar to
a NULL pointer and is not worth logging as an exploit attempt.
Don't log user accesses to 0xffffffff.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://lore.kernel.org/r/0728849e826ba16f1fbd6fa7f5c6cc87bd64e097.1577087627.git.christophe.leroy@c-s.fr
arch/powerpc/mm/fault.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/mm/fault.c
b/arch/powerpc/mm/fault.c
index 9e119f98a7250598dfb45a386bde5dc445f39191..7534ee5bf9b26c15b5f948a9bd9e6c8e70a104a4 100644
(file)
--- a/
arch/powerpc/mm/fault.c
+++ b/
arch/powerpc/mm/fault.c
@@
-350,6
+350,9
@@
static void sanity_check_fault(bool is_write, bool is_user,
* Userspace trying to access kernel address, we get PROTFAULT for that.
*/
if (is_user && address >= TASK_SIZE) {
+ if ((long)address == -1)
+ return;
+
pr_crit_ratelimited("%s[%d]: User access of kernel address (%lx) - exploit attempt? (uid: %d)\n",
current->comm, current->pid, address,
from_kuid(&init_user_ns, current_uid()));