On Tue, May 17, 2022 at 8:08 AM Ondrej Mosnacek <omosnace@xxxxxxxxxx> wrote: > > The code attempts to free the 'new' pointer using kmem_cache_free(), > which is wrong because this function isn't responsible of freeing it. > Instead, the function should free new->htable and clear the contents of > *new (to prevent double-free). > > Fixes: c7c556f1e81b ("selinux: refactor changing booleans") > Reported-by: Wander Lairson Costa <wander@xxxxxxxxxx> > Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx> > --- > security/selinux/ss/hashtab.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Good catch, merged into selinux/stable-5.18 and I'll plan on sending this to Linus tomorrow once the tests finish running. -- paul-moore.com