]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: nft_set_pipapo: fix null deref for empty set
authorFlorian Westphal <fw@strlen.de>
Mon, 11 Aug 2025 10:26:10 +0000 (12:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2025 14:37:39 +0000 (16:37 +0200)
commit51a321b480d1e753667f6aea497312461563f9fe
tree6a1daa3c339426a8fe18c87317442aef91bbde28
parent9c495549ba3053c5c2560e8d46807d1c65818f9a
netfilter: nft_set_pipapo: fix null deref for empty set

commit 30c1d25b9870d551be42535067d5481668b5e6f3 upstream.

Blamed commit broke the check for a null scratch map:
  -  if (unlikely(!m || !*raw_cpu_ptr(m->scratch)))
  +  if (unlikely(!raw_cpu_ptr(m->scratch)))

This should have been "if (!*raw_ ...)".
Use the pattern of the avx2 version which is more readable.

This can only be reproduced if avx2 support isn't available.

Fixes: d8d871a35ca9 ("netfilter: nft_set_pipapo: merge pipapo_get/lookup")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netfilter/nft_set_pipapo.c