lkdtm/heap: Avoid edge and middle of slabs
authorKees Cook <keescook@chromium.org>
Thu, 25 Jun 2020 20:37:02 +0000 (13:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Aug 2020 13:35:33 +0000 (15:35 +0200)
commitb37d4feb9e86763fcdfb25c7f03e326e589fb178
tree57bc8b44ee35572fcf48a6034648a5b82501b570
parentfbda5fd8b46b01952e9eb592011cada626842e58
lkdtm/heap: Avoid edge and middle of slabs

commit e12145cf1c3a8077e6d9f575711e38dd7d8a3ebc upstream.

Har har, after I moved the slab freelist pointer into the middle of the
slab, now it looks like the contents are getting poisoned. Adjust the
test to avoid the freelist pointer again.

Fixes: 3202fa62fb43 ("slub: relocate freelist pointer to middle of object")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20200625203704.317097-3-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/lkdtm/heap.c