Re: [PATCH lkdtm] lkdtm: Fix reference preceded by free

From: Kees Cook
Date: Thu Oct 21 2021 - 23:36:50 EST


On Fri, Oct 22, 2021 at 09:38:59AM +0800, David Yang wrote:
> From: Yang Guang <yang.guang5@xxxxxxxxxx>
> >
> > The coccinelle check report:
> > ./drivers/misc/lkdtm/heap.c:115:7-11:
> > ERROR: reference preceded by free on line 112
> > Moving the "kfree(base)" after using place to fix it.
> >
> > Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
> > Signed-off-by: Yang Guang <yang.guang5@xxxxxxxxxx>
>
> Please ignore this patch. Thanks.

Heh, no worries. It's nice to know that the Coccinelle checks are
finding broken things, though! :) (It's just that LKDTM is intentionally
broken.) ;)

--
Kees Cook