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=1796387330; b=0sgwZhfq0v85AUV8W8dlznL7JTzHCfBbYSvk1wNiM5+QIKWRn6C0GHKkqBjribIHgaTK PTG+wi/3IBFYVh/Qe5eS/PoX6kGs5pVgWzcj1uDNwqZkwzN23ZdL7x+5H9E+Rn7GPcbgE dH4C7jFty9HgUSy71OMIpuRrQmn69V82Rsbalp5H6Xyla9idV0B5o9iOIxAsScUk1fCL0 gn8NCtupZQdzv7geX07yzFhH+juS0TSSZ4NT2OKa6G1ocDm7PGTtBBjlCEis1sp7noXTH rGPkryuijKsmrjVc/dd8FKr1Ku74UNGqbV8ec73Y+zrK7COEgWAtn5Y734FG5GWRQhw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387330; 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=najANMUkNOScp1PtH8Rbh64ganV51Ga6OHwaknaHKR8=; b=Sfnmp2d/qgmt/5YJcTAv5E6MZhwOzYdwSYOHYQoBSk5bjYCaj+ik8mGv7I9sLS2q6yYw KIEFaCvgslEMfcN88Pk9ADB8RR9bOAwnturDSz9XUAQyFrvqXz/mMeGY/jInN+sTbsIGl 26XTWgxuKGvnrcQInWt/TOFGpa+4WFXunIwUpRpR19lXMXsCClfjmgBX6GNyv0tjaga/9 KcGuRACUkNfv5MEP1qz1nOmGMgEsRY65mT0jdJ1H87JNV+9UbBZHlyboSh/fCKRVXl5O4 Ksaa8ZY6LwQLMrfSv7+p/MFluwMxZNp1cYmfX7P1A5w1yO9eTAgr89Lj+WwQHAJxP1Q== 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=Hc+gMQAJ; 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 87F8A606A322; Fri, 4 Dec 2026 12:28:50 +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=Hc+gMQAJ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03F6A1F000C2; Fri, 4 Dec 2026 12:28:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796387330; bh=najANMUkNOScp1PtH8Rbh64ganV51Ga6OHwaknaHKR8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Hc+gMQAJTeWqoueThkI+OTw8MeF3B5c/J2Wm5ARh5m+1C/k3ThrBrQ4eHxEr47Vwz td3ov+oJimb5zoC8mSyCXeozSEByEsvDgTz4kR+5oZ6G7bmgcqkMZAJxIIhIG1Y0c2 +lxB2623APeHaDb+VgulIjlpEJTthh+UTS9ayk/g= 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.1 0201/1059] amt: use ipv6_hdr() in amt_mldv1_leave_handler() Date: Fri, 4 Dec 2026 18:55:32 +0900 Message-ID: <20261204100649.488336054@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@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.1-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