]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Mar 2024 17:36:09 +0000 (18:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Mar 2024 17:36:09 +0000 (18:36 +0100)
added patches:
netfilter-nf_tables-disallow-timeout-for-anonymous-sets.patch
series

queue-5.15/netfilter-nf_tables-disallow-timeout-for-anonymous-sets.patch [new file with mode: 0644]
queue-5.15/series [new file with mode: 0644]

diff --git a/queue-5.15/netfilter-nf_tables-disallow-timeout-for-anonymous-sets.patch b/queue-5.15/netfilter-nf_tables-disallow-timeout-for-anonymous-sets.patch
new file mode 100644 (file)
index 0000000..39af302
--- /dev/null
@@ -0,0 +1,40 @@
+From e26d3009efda338f19016df4175f354a9bd0a4ab Mon Sep 17 00:00:00 2001
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+Date: Fri, 16 Jun 2023 15:22:18 +0200
+Subject: netfilter: nf_tables: disallow timeout for anonymous sets
+
+From: Pablo Neira Ayuso <pablo@netfilter.org>
+
+commit e26d3009efda338f19016df4175f354a9bd0a4ab upstream.
+
+Never used from userspace, disallow these parameters.
+
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/netfilter/nf_tables_api.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/net/netfilter/nf_tables_api.c
++++ b/net/netfilter/nf_tables_api.c
+@@ -4682,6 +4682,9 @@ static int nf_tables_newset(struct sk_bu
+               if (!(flags & NFT_SET_TIMEOUT))
+                       return -EINVAL;
++              if (flags & NFT_SET_ANONYMOUS)
++                      return -EOPNOTSUPP;
++
+               err = nf_msecs_to_jiffies64(nla[NFTA_SET_TIMEOUT], &desc.timeout);
+               if (err)
+                       return err;
+@@ -4690,6 +4693,10 @@ static int nf_tables_newset(struct sk_bu
+       if (nla[NFTA_SET_GC_INTERVAL] != NULL) {
+               if (!(flags & NFT_SET_TIMEOUT))
+                       return -EINVAL;
++
++              if (flags & NFT_SET_ANONYMOUS)
++                      return -EOPNOTSUPP;
++
+               desc.gc_int = ntohl(nla_get_be32(nla[NFTA_SET_GC_INTERVAL]));
+       }
diff --git a/queue-5.15/series b/queue-5.15/series
new file mode 100644 (file)
index 0000000..42d7784
--- /dev/null
@@ -0,0 +1 @@
+netfilter-nf_tables-disallow-timeout-for-anonymous-sets.patch