Messages in this thread | | | From | Kees Cook <> | Date | Wed, 9 Jan 2019 12:05:02 -0800 | Subject | Re: [PATCH] lkdtm: Add a tests for NULL pointer dereference |
| |
On Wed, Jan 9, 2019 at 7:16 AM Kees Cook <keescook@chromium.org> wrote: > > On Tue, Jan 8, 2019 at 10:31 PM Christophe Leroy > <christophe.leroy@c-s.fr> wrote: > > > > > > > > Le 09/01/2019 à 02:14, Kees Cook a écrit : > > > On Fri, Dec 14, 2018 at 7:26 AM Christophe Leroy > > > <christophe.leroy@c-s.fr> wrote: > > >> > > >> Introduce lkdtm tests for NULL pointer dereference: check > > >> access or exec at NULL address. > > > > > > Why is this not already covered by the existing tests? (Is there > > > something special about NULL that is being missed?) I'd expect SMAP > > > and SMEP to cover NULL as well. > > > > Most arches print a different message whether the faulty address is > > above or under PAGE_SIZE. Below is exemple from x86: > > > > pr_alert("BUG: unable to handle kernel %s at %px\n", > > address < PAGE_SIZE ? "NULL pointer dereference" : "paging request", > > (void *)address); > > > > > > Until recently, the powerpc arch didn't do it. When I implemented it > > (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=49a502ea23bf9dec47f8f3c3960909ff409cd1bb), > > I needed a way to test it and couldn't find an existing one, hence this > > new LKDTM test. > > > > But maybe I missed something ? > > Okay, gotcha. You're getting more complete reporting coverage. Sounds > good to me. Thanks! > > Acked-by: Kees Cook <keescook@chromium.org>
Applied to my lkdtm -next tree.
-- Kees Cook
| |