From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796228142; b=XoW6RdWnLABZNzTXye5xYgEn1weu5YgkN7lfLjoGzYuXhIHwgHiCwBL5HCIUVvLYn/5J 2R7Z1N1EP1iva2fOsOnKVn0l9BCDNwUAqy0qZE3U+ZI/0n4mdfjVtodlMejaH3Og+gdzu +F2ytyzn1kpYTEG+FTdOch+eO6u/8QNl16CWIPmClllAAfKNGBDmzwitHEvGHFEifcY2Q WofjtreGMbt0WUyZhWP65/NgWh6x64IAIFVUHCYBZVb9aBUk3MSlXh7LWVQ3R819CaAaj KfB/zDRsVWUD3mxQ/T8csnHJwFKAlmJtoDYgZegOyCq22sC8/arIqR9DHmyoM6ZOc+A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796228142; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=PnRxQIBzUMPoc8etbqWvVPNV3UqvIv+ndkmWTnLSg9Y=; b=Iuy9fFMB+H/L1Zd6yKkbMcRWmXA3SHPIIw/eJHWp3q1DfOA7xm+m5vKrV5mjZJ/hMUEl bd2vyUyPP5ooi2iA8xZiSP8lp420ziJXPg58wncWMSI6RU/3vvQzBvDq3tfzkoi8MNRT1 c6xeXX6ZioE2e41aodDtrPm2ap5BSCAZkp/9Suu3W04Llyrn0a4jdF+/604c2u3WVkkts 7cP6d5NP3TEKSM/6Hfn/KL06ov3n3vQ91uBjXjYG9eaXx4JetH8wgagbaA69GSMv99tbT Q1gibgMaaguVunyW8e2tEKely/G1TUB/YXb93D9lJZnzTqFzoUuw1sqyT7AKPB5VIjQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=j5OlPzMr; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 404AA606A333 for ; Wed, 2 Dec 2026 16:15:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=j5OlPzMr Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66CBB1F00923; Wed, 2 Dec 2026 16:15:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796228141; bh=PnRxQIBzUMPoc8etbqWvVPNV3UqvIv+ndkmWTnLSg9Y=; h=Subject:To:Cc:From:Date; b=j5OlPzMrJArMSGFl3PwVyUDhmS+8Wvkmkd/EHQkBj15H4UmteJ5GCcbIeaRzx+5ON PHr5I7SJU7Zth2Z2pSgQp5FhNS47DIbB+yaaClolXoOYtmpx/l4j5AWavmxl3xL/oG 0nDqtLlQcMyeb8nj9fZ69PGQk7+dbJe52Sbgu1FY= Subject: FAILED: patch "[PATCH] ipv6: mcast: use skb_set_transport_header_careful() in" failed to apply to 6.6-stable tree To: edumazet@kernel.org,idosch@nvidia.com,justin.iurman@gmail.com,pabeni@redhat.com Cc: From: Date: Wed, 02 Dec 2026 16:10:22 +0100 Message-ID: <2026120222-lilly-relight-c1c4@gregkh> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.6-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y git checkout FETCH_HEAD git cherry-pick -x 425b1fe50b71628299d33faff28057e7fa4c60c7 # git commit -s git send-email --to '' --in-reply-to '2026120222-lilly-relight-c1c4@gregkh' --subject-prefix 'PATCH 6.6.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 425b1fe50b71628299d33faff28057e7fa4c60c7 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Fri, 13 Nov 2026 13:46:22 +0100 Subject: [PATCH] ipv6: mcast: use skb_set_transport_header_careful() in ipv6_mc_check_exthdrs() skb->transport_header is a 16-bit offset from skb->head, and U16_MAX is reserved as the "not set" value. skb_set_transport_header() silently truncates an offset that does not fit. ipv6_mc_check_exthdrs() stores the offset returned by ipv6_skip_exthdr(), which depends on the extension headers found in the packet. Should the value be truncated, ipv6_mc_check_icmpv6() and ipv6_mc_check_mld_msg() would then validate and parse the MLD message at the wrong place. Since commit 3744b0964d52 ("ipv6: Implement limits on extension header parsing") a single chain is bounded to IP6_MAX_EXT_HDRS_CNT headers (24576 bytes), so this needs a large skb->data - skb->head on top of it, for instance after several nested decapsulations, each of them possibly pulling its own extension header chain. No reproducer was written, this is hardening. Use skb_set_transport_header_careful() and treat such a packet as broken (-EINVAL). Fixes: 9afd85c9e455 ("net: Export IGMP/MLD message validation code") Cc: stable@vger.kernel.org Signed-off-by: Eric Dumazet Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20261113124625.4010206-3-edumazet@kernel.org Reviewed-by: Justin Iurman Signed-off-by: Paolo Abeni diff --git a/net/ipv6/mcast_snoop.c b/net/ipv6/mcast_snoop.c index 04d5fcdfa6e0..7abf79815aa2 100644 --- a/net/ipv6/mcast_snoop.c +++ b/net/ipv6/mcast_snoop.c @@ -56,7 +56,8 @@ static int ipv6_mc_check_exthdrs(struct sk_buff *skb) if (nexthdr != IPPROTO_ICMPV6) return -ENOMSG; - skb_set_transport_header(skb, offset); + if (!skb_set_transport_header_careful(skb, offset)) + return -EINVAL; return 0; }