lkdtm/heap: Add vmalloc linear overflow test
authorKees Cook <keescook@chromium.org>
Wed, 23 Jun 2021 20:39:32 +0000 (13:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jun 2021 13:32:07 +0000 (15:32 +0200)
commit9c4f6ebc3665b33f15ee97ba1eb2c9bed341b8e6
treeee929c0ca5be163d95c89008ade223ee80473d9c
parenta15676ac8f24a9ac5fd881cf17be4be13fa0910a
lkdtm/heap: Add vmalloc linear overflow test

Similar to the existing slab overflow and stack exhaustion tests, add
VMALLOC_LINEAR_OVERFLOW (and rename the slab test SLAB_LINEAR_OVERFLOW).
Additionally unmarks the test as destructive. (It should be safe in the
face of misbehavior.)

Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210623203936.3151093-6-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/lkdtm/core.c
drivers/misc/lkdtm/heap.c
drivers/misc/lkdtm/lkdtm.h
tools/testing/selftests/lkdtm/tests.txt