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=1796010514; b=1ks4sfwN+qhfqJttO2x2SzstuZPUBnTtNZuWWGAOYn4HkZmLKSACo+UPdE+M4OyWxT7S fi2rG3lUYe60aoTZqLzHy1lVfDO4HPm5lmOOW0KHOgb22DCZYEYGf//eO84BFRoMu/qVY 0MeEjU9v6T1FgT3dAEOtX8yT3l+A0kgd8Ev9Ryimj/Di7fuNuldB/s9/WbA0Tz5/xjfLh J/wZXeh04qUg8U/ApzHCBJlG7MlN78V+oZt+I3pQX9Oqxr+AT4lzLKXv16HkIqZbNspPi jWfKpy+PIpAcXypyH/2IgJT0WGTYVE4pfaXwoD1/lblc1Uc6T7j2JLENF9kOBw2X1Hw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796010514; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=Fj6naVsnWNmPxzjyM1AevjW7k5buVhoSyMyMIxKYoss=; b=JzgHt6KlLPsIeqznLSJOmmWjVP8rVgQsxn/n6p7ihdHbpH0dFyRy23kqJrGvoo0Pbisg BItW4XEvhWYSDbW9VqaML5A3kitOzs1S8uw2fCB31dVBZuoKwG+zPa8SPTWw/KwkvdRh7 qgoE9iSLqwQSe+uJk1swKgIxHW9L6ZZ0EfW8kH1YQGe27LAqyHkDkyDqY+UI8eiTLH8s7 k9U/Oktkp6rR38ff2bt8I1csSPCdcFiPYwWmDmgjaqLBsZx++RVpoWo39FoI+86ZDWJVN Cu6HTUYLfClr7IDCcHFdloAZZZUE/c+mu/POwt9jVdl9YGUP6cZa32vHwF2NCijaDQw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TDm57zYi; 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 0D9EE606A33B; Mon, 30 Nov 2026 03:48:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TDm57zYi Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDAE11F00896; Mon, 30 Nov 2026 03:48:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796010513; bh=Fj6naVsnWNmPxzjyM1AevjW7k5buVhoSyMyMIxKYoss=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=TDm57zYiJCojjRNqq5+ndyaF9tj4VKYEBNyulykdv1eZE+jh3yKcHZfdgf0Ww5q/D 3XfX51IV2hmNUU2b0DT5NN/V7QzkPMGp2qJcpsDaBKDkXFpBWtg+vMBjkMwRAXvO61 qt81frZyiS52WtJI9WXe4M9BZGVUvfiCE5G/HfKGb/Lx2/uf6oN9Ydaae4i5/JpI+x 2G05SY3oi332mkqKPeQ/qELN72Yg7+I8CM1rY9ctRcVgyfc7qxm4jH8KavsL1AcngJ 0t8XsekFbnr92mzrgJHZ/C+bAymb7QuYOeqFoRLefyekEGiUs2OiPMn1rQIUPADWDk cAZAMm9DJbEbQ== Subject: Re: [PATCH net-next v4 05/12] amt: forward multicast data over IPv6 From: netdev-bot+sashiko@kernel.org To: omar@blockcast.net Cc: ap420073@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org, horms@kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, willemb@google.com Date: Mon, 30 Nov 2026 03:48:32 +0000 Message-ID: <179601051244.3146.8134195674516208005@kernel.org> In-Reply-To: <20261129034652.1853485-6-omar@blockcast.net> References: <20261129034652.1853485-6-omar@blockcast.net> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 0 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [Medium] In amt_dev_xmit() (drivers/net/amt.c), the patch saves the transport header before calling ipv6_mc_check_mld() and restores it… -- amt: forward multicast data over IPv6 This commit makes the AMT relay send Multicast Data through amt_udp_xmit(), so the data path works over IPv6 as well as IPv4. Over IPv6 it routes first, drops payloads that do not fit the route MTU minus the outer and AMT headers, and sends a single Packet Too Big to an IPv6 source. It also puts back the transport header that ipv6_mc_check_mld() moved, so the per-segment GSO length check counts extension headers. > diff --git a/drivers/net/amt.c b/drivers/net/amt.c > index 8da1e73b1655e..bcd88203eeab9 100644 > --- a/drivers/net/amt.c > +++ b/drivers/net/amt.c [ ... ] > @@ -1524,6 +1573,9 @@ static netdev_tx_t amt_dev_xmit(struct sk_buff *skb, struct net_device *dev) > group.ip4 = ip_hdr(skb)->daddr; > #if IS_ENABLED(CONFIG_IPV6) > } else if (iph->version == 6) { > + bool th_set = skb_transport_header_was_set(skb); > + int th_off = th_set ? skb_transport_offset(skb) : 0; > + > ip6h = ipv6_hdr(skb); > if (!ipv6_addr_is_multicast(&ip6h->daddr)) > goto free; > @@ -1540,6 +1592,14 @@ static netdev_tx_t amt_dev_xmit(struct sk_buff *skb, struct net_device *dev) > } > } else { > data = true; > + /* ipv6_mc_check_mld() set the transport header > + * just past the fixed IPv6 header, even when > + * extension headers follow, which would make the > + * segments of a GSO skb look shorter than they > + * are. Put it back. > + */ > + if (th_set) > + skb_set_transport_header(skb, th_off); [Severity: Medium] Does the saved th_off actually account for extension headers on the relay's usual input path, IPv6 multicast forwarded by ip6mr? For received packets, ip6_rcv_core() in net/ipv6/ip6_input.c sets: skb->transport_header = skb->network_header + sizeof(*hdr); Only ipv6_parse_hopopts() moves it after that, and only past a Hop-by-Hop header. Nothing on the ip6mr forwarding path moves it past a Destination Options or Routing header. ipv6_mc_check_exthdrs() also returns -ENOMSG right away when nexthdr is not HOPOPTS. So for a forwarded packet with a Destination Options header, th_off is still network + 40. Restoring it leaves the transport header at the start of the extension header, which is the offset the comment says it is undoing. The skb then reaches amt_tmtu_exceeded(): amt_dev_xmit() amt_send_multicast_data() amt_tmtu_exceeded() skb_gso_validate_network_len(oskb, tmtu) For a UDP_L4 GSO skb, the segment length is computed as (transport - network) + sizeof(struct udphdr) + gso_size. Can this under-count each segment by the length of the extension headers, so that segments up to that many bytes over the tunnel MTU pass the RFC 7450 s5.3.3.6.2.2 drop check, and the source never gets a Packet Too Big? One way to hit this is an ingress device with rx-udp-gro-forwarding enabled. ipv6_gro_receive() pulls the Destination Options header through ipv6_gro_pull_exthdrs() and builds a UDP_L4 GSO skb, which ip6mr then forwards to the amt device. The same offset is then copied into inner_transport_header by skb_reset_inner_headers() in amt_send_multicast_data(): > skb_reset_mac_header(skb); > skb_reset_inner_headers(skb); Would the outer skb_gso_validate_network_len() in ip6_finish_output_gso() under-count the same way, letting outer segments larger than dst_mtu() leave the relay unfragmented, only to be dropped by the link or a hop further on? This code is unchanged at the end of the series. > } > v6 = true; > group.ip6 = ipv6_hdr(skb)->daddr; [ ... ] -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261129034652.1853485-1-omar%40blockcast.net