Skip to content

Commit 0f9aee0

Browse files
chleroympe
authored andcommitted
powerpc/mm: Don't log user reads to 0xffffffff
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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/0728849e826ba16f1fbd6fa7f5c6cc87bd64e097.1577087627.git.christophe.leroy@c-s.fr
1 parent cd08f10 commit 0f9aee0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/powerpc/mm/fault.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ static void sanity_check_fault(bool is_write, bool is_user,
350350
* Userspace trying to access kernel address, we get PROTFAULT for that.
351351
*/
352352
if (is_user && address >= TASK_SIZE) {
353+
if ((long)address == -1)
354+
return;
355+
353356
pr_crit_ratelimited("%s[%d]: User access of kernel address (%lx) - exploit attempt? (uid: %d)\n",
354357
current->comm, current->pid, address,
355358
from_kuid(&init_user_ns, current_uid()));

0 commit comments

Comments
 (0)