]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.16-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2025 15:13:23 +0000 (17:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2025 15:13:23 +0000 (17:13 +0200)
added patches:
netfilter-nft_set_pipapo-fix-null-deref-for-empty-set.patch

queue-6.16/netfilter-nft_set_pipapo-fix-null-deref-for-empty-set.patch [new file with mode: 0644]
queue-6.16/series

diff --git a/queue-6.16/netfilter-nft_set_pipapo-fix-null-deref-for-empty-set.patch b/queue-6.16/netfilter-nft_set_pipapo-fix-null-deref-for-empty-set.patch
new file mode 100644 (file)
index 0000000..546b96d
--- /dev/null
@@ -0,0 +1,40 @@
+From 30c1d25b9870d551be42535067d5481668b5e6f3 Mon Sep 17 00:00:00 2001
+From: Florian Westphal <fw@strlen.de>
+Date: Mon, 11 Aug 2025 12:26:10 +0200
+Subject: netfilter: nft_set_pipapo: fix null deref for empty set
+
+From: Florian Westphal <fw@strlen.de>
+
+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 |    5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+--- a/net/netfilter/nft_set_pipapo.c
++++ b/net/netfilter/nft_set_pipapo.c
+@@ -426,10 +426,9 @@ static struct nft_pipapo_elem *pipapo_ge
+       local_bh_disable();
+-      if (unlikely(!raw_cpu_ptr(m->scratch)))
+-              goto out;
+-
+       scratch = *raw_cpu_ptr(m->scratch);
++      if (unlikely(!scratch))
++              goto out;
+       map_index = scratch->map_index;
index 7ab17088524336bcf4162fafccc1a8a0c1af30ed..a928e86a7e96c61ba302a5d493387ad4e7ca0d23 100644 (file)
@@ -187,3 +187,4 @@ phy-qcom-qmp-pcie-fix-phy-initialization-when-powered-down-by-firmware.patch
 phy-tegra-xusb-fix-device-and-of-node-leak-at-probe.patch
 phy-ti-omap-usb2-fix-device-leak-at-unbind.patch
 phy-ti-pipe3-fix-device-leak-at-unbind.patch
+netfilter-nft_set_pipapo-fix-null-deref-for-empty-set.patch