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=1796384710; b=BYi91TTnMX7mgycVlZ0yjmaRxt7X3EJvo5B4q75RbnOkbdYN1cdrxFjFibO7zGb1cZmy 8iiMYVBvy2goFGOLWhZP3B/JH/FGArjuAHJyw8RpHNqIMRTll5gZNaoxNW1HkSv5nR5ey MENS2buBzJrZIYwjr/T2LkJDkJ+vsv4w2BnZ5m6PL6zFfkTopCjJSJ+9P1zJGCi9W7c03 SLaXq9EI+t0j2hkJ4Fj2a2wKDs2I72Ch1ifrM21myYMj4ICET4Qy3vh46O2ChkMWwRyC3 SAssIkJJO62AWb//ifikpJoT5uWOeUXDwu4yyQwZeqT+1/DyuTX5Ar/o/e4Wdl04ufg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384710; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=CTbNkIPClPkhk+/Fu954lL8HNjcpB7MdhR3EDald324=; b=2rEBHLqBkvDQOmZq0Yoz6NC8fmUPb51GzsUsvMNN8JH4WQBGd/gPdOlygZiubmcNPNDX E2yZQU/tLCzCcvruKPkoGsboQ/x50e53ArGFhTvCZbfvkMW07Ae3keBxy6zLqbQTzd0ep lIpVwSn64+QdQMc9PR96fC7Ifzwu8JaMJLSTsQt+Gu1PNRhTpBKFmd2Uw7E8McfsmYOTe USosi8gjq7sKyEtcvbj9ZJIoczL+5G073G3KMaMiXA/6TvvBA7NuoLsc8aI9bA32gm8Q3 aknXxzI45AcPcKfCyOizvvxQ/s3ZBNSJnqvDXXjkWPwNuoFJJ+Eds01yeoWOPMMSp1w== 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=AmxJ4iBP; 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 2264C606A337; Fri, 4 Dec 2026 11:45:10 +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=AmxJ4iBP Received: by smtp.kernel.org (Postfix) with ESMTPSA id 913F81F000C2; Fri, 4 Dec 2026 11:45:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384710; bh=CTbNkIPClPkhk+/Fu954lL8HNjcpB7MdhR3EDald324=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AmxJ4iBP5qBLo84szDO0+lCLdWzxD10KBydNosHsGQSij64Fo6xitztWM3pjLLCsF koZZaQznbDAI8HARCXBpVFRpo6lBvQ479RkMc0GcW84RRGuZnWCF12BQeNpcQbUHkK 1AcKaxjxtGkv1iGTpsyG57CMh8N8NwGteDfs+oMs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wenbo Sun , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.6 0260/1167] amt: use ipv6_hdr() in amt_mldv1_leave_handler() Date: Fri, 4 Dec 2026 18:54:47 +0900 Message-ID: <20261204100708.834244884@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wenbo Sun [ Upstream commit 6730fe495c35f174a424ab58cf5fdf99ce4746e9 ] In amt_mldv1_leave_handler(), which handles IPv6 MLDv1 Done (ICMPV6_MGM_REDUCTION) messages, the source address is mistakenly extracted via ip_hdr(skb)->saddr into host.ip4 instead of copying the IPv6 source address from ipv6_hdr(skb)->saddr into host.ip6 as amt_mldv1_report_handler() does. Because amt_lookup_group() compares the full union amt_addr for v6 groups, looking up the group with a 32-bit IPv4 header slice fails to match the group entry created by amt_mldv1_report_handler(). As a result, amt_del_group() is not called when an MLDv1 listener leaves, and the AMT relay continues forwarding multicast traffic until the group timer expires. Use ipv6_hdr(skb) and copy ip6h->saddr into host.ip6 so that MLDv1 Done messages properly match and delete the corresponding IPv6 group. This issue was found via LLM-assisted code review, confirmed by reproducing the stale group forwarding in a User-Mode Linux (ARCH=um) environment, and verified in UML by testing that AMT relay multicast forwarding stops immediately after receiving an MLDv1 Done message. Fixes: b75f7095d4d4 ("amt: add mld report message handler") Signed-off-by: Wenbo Sun Link: https://patch.msgid.link/20261111031147.105834-1-sunwenbo@cmss.chinamobile.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/amt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/amt.c b/drivers/net/amt.c index d318dd9bf7671..6d115a20a1a0c 100644 --- a/drivers/net/amt.c +++ b/drivers/net/amt.c @@ -2129,13 +2129,12 @@ static void amt_mldv1_leave_handler(struct amt_dev *amt, struct sk_buff *skb, struct amt_tunnel_list *tunnel) { struct mld_msg *mld = (struct mld_msg *)icmp6_hdr(skb); - struct iphdr *iph = ip_hdr(skb); + struct ipv6hdr *ip6h = ipv6_hdr(skb); struct amt_group_node *gnode; union amt_addr group, host; memcpy(&group.ip6, &mld->mld_mca, sizeof(struct in6_addr)); - memset(&host, 0, sizeof(union amt_addr)); - host.ip4 = iph->saddr; + memcpy(&host.ip6, &ip6h->saddr, sizeof(struct in6_addr)); gnode = amt_lookup_group(tunnel, &group, &host, true); if (gnode) { -- 2.53.0