Re: [PATCH] powerpc/mm: Don't see NULL pointer dereference as a KUAP fault

From: Christophe Leroy
Date: Fri Dec 04 2020 - 01:31:45 EST




Le 03/12/2020 à 12:55, Michael Ellerman a écrit :
Christophe Leroy <christophe.leroy@xxxxxxxxxx> writes:
Sometimes, NULL pointer dereferences are expected. Even when they
are accidental they are unlikely an exploit attempt because the
first page is never mapped.

The first page can be mapped if mmap_min_addr is 0.

Blocking all faults to the first page would potentially break any
program that does that.

Also if there is something mapped at 0 it's a good chance it is an
exploit attempt :)

Ok, I see.

In fact, we hit this warning because we don't provide copy_from_kernel_nofault_allowed()

I'll cook a patch for that.

Christophe