]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Apr 2026 13:41:01 +0000 (15:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Apr 2026 13:41:01 +0000 (15:41 +0200)
added patches:
checkpatch-add-support-for-assisted-by-tag.patch

queue-6.18/checkpatch-add-support-for-assisted-by-tag.patch [new file with mode: 0644]
queue-6.18/netfilter-conntrack-add-missing-netlink-policy-validations.patch [deleted file]
queue-6.18/series

diff --git a/queue-6.18/checkpatch-add-support-for-assisted-by-tag.patch b/queue-6.18/checkpatch-add-support-for-assisted-by-tag.patch
new file mode 100644 (file)
index 0000000..881e0ce
--- /dev/null
@@ -0,0 +1,63 @@
+From d1db4118489fffd2b2f612140b7acbb477880839 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 11 Mar 2026 17:58:17 -0400
+Subject: checkpatch: add support for Assisted-by tag
+
+From: Sasha Levin <sashal@kernel.org>
+
+commit d1db4118489fffd2b2f612140b7acbb477880839 upstream.
+
+The Assisted-by tag was introduced in
+Documentation/process/coding-assistants.rst for attributing AI tool
+contributions to kernel patches.  However, checkpatch.pl did not recognize
+this tag, causing two issues:
+
+  WARNING: Non-standard signature: Assisted-by:
+  ERROR: Unrecognized email address: 'AGENT_NAME:MODEL_VERSION'
+
+Fix this by:
+1. Adding Assisted-by to the recognized $signature_tags list
+2. Skipping email validation for Assisted-by lines since they use the
+   AGENT_NAME:MODEL_VERSION format instead of an email address
+3. Warning when the Assisted-by value doesn't match the expected format
+
+Link: https://lkml.kernel.org/r/20260311215818.518930-1-sashal@kernel.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Reported-by: Bart Van Assche <bvanassche@acm.org>
+Acked-by: Joe Perches <joe@perches.com>
+Cc: Andy Whitcroft <apw@canonical.com>
+Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
+Cc: Jonathan Corbet <corbet@lwn.net>
+Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ scripts/checkpatch.pl |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/scripts/checkpatch.pl
++++ b/scripts/checkpatch.pl
+@@ -641,6 +641,7 @@ our $signature_tags = qr{(?xi:
+       Reviewed-by:|
+       Reported-by:|
+       Suggested-by:|
++      Assisted-by:|
+       To:|
+       Cc:
+ )};
+@@ -3087,6 +3088,15 @@ sub process {
+                               }
+                       }
++                      # Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
++                      if ($sign_off =~ /^Assisted-by:/i) {
++                              if ($email !~ /^\S+:\S+/) {
++                                      WARN("BAD_SIGN_OFF",
++                                           "Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format\n" . $herecurr);
++                              }
++                              next;
++                      }
++
+                       my ($email_name, $name_comment, $email_address, $comment) = parse_email($email);
+                       my $suggested_email = format_email(($email_name, $name_comment, $email_address, $comment));
+                       if ($suggested_email eq "") {
diff --git a/queue-6.18/netfilter-conntrack-add-missing-netlink-policy-validations.patch b/queue-6.18/netfilter-conntrack-add-missing-netlink-policy-validations.patch
deleted file mode 100644 (file)
index f6b5bb5..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-From stable+bounces-237711-greg=kroah.com@vger.kernel.org Tue Apr 14 05:31:44 2026
-From: Li hongliang <1468888505@139.com>
-Date: Tue, 14 Apr 2026 11:31:29 +0800
-Subject: netfilter: conntrack: add missing netlink policy validations
-To: gregkh@linuxfoundation.org, stable@vger.kernel.org, fw@strlen.de
-Cc: patches@lists.linux.dev, linux-kernel@vger.kernel.org, pablo@netfilter.org, kadlec@netfilter.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, kaber@trash.net, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, imv4bel@gmail.com
-Message-ID: <20260414033129.48460-1-1468888505@139.com>
-
-From: Florian Westphal <fw@strlen.de>
-
-[ Upstream commit f900e1d77ee0ef87bfb5ab3fe60f0b3d8ad5ba05 ]
-
-Hyunwoo Kim reports out-of-bounds access in sctp and ctnetlink.
-
-These attributes are used by the kernel without any validation.
-Extend the netlink policies accordingly.
-
-Quoting the reporter:
-  nlattr_to_sctp() assigns the user-supplied CTA_PROTOINFO_SCTP_STATE
-  value directly to ct->proto.sctp.state without checking that it is
-  within the valid range. [..]
-
-  and: ... with exp->dir = 100, the access at
-  ct->master->tuplehash[100] reads 5600 bytes past the start of a
-  320-byte nf_conn object, causing a slab-out-of-bounds read confirmed by
-  UBSAN.
-
-Fixes: 076a0ca02644 ("netfilter: ctnetlink: add NAT support for expectations")
-Fixes: a258860e01b8 ("netfilter: ctnetlink: add full support for SCTP to ctnetlink")
-Reported-by: Hyunwoo Kim <imv4bel@gmail.com>
-Signed-off-by: Florian Westphal <fw@strlen.de>
-Signed-off-by: Li hongliang <1468888505@139.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- net/netfilter/nf_conntrack_netlink.c    | 2 +-
- net/netfilter/nf_conntrack_proto_sctp.c | 3 ++-
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
-index 879413b9fa06..2bb9eb2d25fb 100644
---- a/net/netfilter/nf_conntrack_netlink.c
-+++ b/net/netfilter/nf_conntrack_netlink.c
-@@ -3465,7 +3465,7 @@ ctnetlink_change_expect(struct nf_conntrack_expect *x,
- #if IS_ENABLED(CONFIG_NF_NAT)
- static const struct nla_policy exp_nat_nla_policy[CTA_EXPECT_NAT_MAX+1] = {
--      [CTA_EXPECT_NAT_DIR]    = { .type = NLA_U32 },
-+      [CTA_EXPECT_NAT_DIR]    = NLA_POLICY_MAX(NLA_BE32, IP_CT_DIR_REPLY),
-       [CTA_EXPECT_NAT_TUPLE]  = { .type = NLA_NESTED },
- };
- #endif
-diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c
-index 7c6f7c9f7332..645d2c43ebf7 100644
---- a/net/netfilter/nf_conntrack_proto_sctp.c
-+++ b/net/netfilter/nf_conntrack_proto_sctp.c
-@@ -582,7 +582,8 @@ static int sctp_to_nlattr(struct sk_buff *skb, struct nlattr *nla,
- }
- static const struct nla_policy sctp_nla_policy[CTA_PROTOINFO_SCTP_MAX+1] = {
--      [CTA_PROTOINFO_SCTP_STATE]          = { .type = NLA_U8 },
-+      [CTA_PROTOINFO_SCTP_STATE]          = NLA_POLICY_MAX(NLA_U8,
-+                                                       SCTP_CONNTRACK_HEARTBEAT_SENT),
-       [CTA_PROTOINFO_SCTP_VTAG_ORIGINAL]  = { .type = NLA_U32 },
-       [CTA_PROTOINFO_SCTP_VTAG_REPLY]     = { .type = NLA_U32 },
- };
--- 
-2.34.1
-
index e8611f3845011b95dcbf7e309dbf2ea4c60b9105..6186845028fff6fc522987fa396c9baef6faaa16 100644 (file)
@@ -174,4 +174,4 @@ kvm-x86-use-__declare_flex_array-for-uapi-structures-with-vlas.patch
 ocfs2-add-inline-inode-consistency-check-to-ocfs2_validate_inode_block.patch
 ocfs2-validate-inline-data-i_size-during-inode-read.patch
 ocfs2-fix-out-of-bounds-write-in-ocfs2_write_end_inline.patch
-netfilter-conntrack-add-missing-netlink-policy-validations.patch
+checkpatch-add-support-for-assisted-by-tag.patch