From: sashiko-bot@kernel.org
To: "Fernando Fernandez Mancera" <fmancera@suse.de>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH 06/13 net-next] net: udp: split IPv4 specific logic into udp_ipv4.c
Date: Fri, 11 Sep 2026 15:15:37 +0000 [thread overview]
Message-ID: <20260911151537.BB9111F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260910144914.8025-7-fmancera@suse.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Aggregated IPv4 UDP packets are silently dropped during GRO completion when CONFIG_IPV4 is disabled.
--
commit d963ce43c73f11f406bea2e26b36c86cf494d30c
Author: Fernando Fernandez Mancera <fmancera@suse.de>
net: udp: split IPv4 specific logic into udp_ipv4.c
This commit moves IPv4-specific UDP socket logic from udp.c into a new
udp_ipv4.c file. This isolates the IPv4 functions from the generic UDP
socket infrastructure, allowing the INET subsystem to be compiled without
IPv4.
> diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
> --- a/net/ipv4/udp_offload.c
> +++ b/net/ipv4/udp_offload.c
[ ... ]
> @@ -954,6 +960,7 @@ int udp_gro_complete(struct sk_buff *skb, int nhoff,
>
> INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff)
> {
> +#if IS_ENABLED(CONFIG_IPV4)
> const u16 offset = NAPI_GRO_CB(skb)->network_offsets[skb->encapsulation];
> const struct iphdr *iph = (struct iphdr *)(skb->data + offset);
> struct udphdr *uh = (struct udphdr *)(skb->data + nhoff);
[ ... ]
> @@ -975,6 +982,9 @@ INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff)
> iph->daddr, 0);
>
> return udp_gro_complete(skb, nhoff, udp4_lib_lookup_skb);
> +#else
> + return -EAFNOSUPPORT;
> +#endif
> }
[Severity: High]
Does this cause aggregated IPv4 UDP packets to be silently dropped during
GRO completion when CONFIG_IPV4 is disabled?
When an IPv4 UDP packet stream is aggregated by GRO on a system compiled
with CONFIG_IPV4=n, returning -EAFNOSUPPORT causes the GRO engine
(gro_complete) to treat the completion as a failure, invoking kfree_skb()
and dropping the packet.
Since udp4_gro_receive remains unconditionally enabled in udpv4_offload_init
(as net/ipv4/udp_offload.c is compiled when CONFIG_INET=y), untrusted
network input can reach this path. Even on an IPv6-only node, an L2 bridge
or packet sniffer expects to see L2 traffic correctly. Dropping aggregated
packets breaks L2 bridging of IPv4 UDP traffic and prevents packet sniffers
from seeing bulk traffic streams.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260910144914.8025-1-fmancera@suse.de?part=6
next prev parent reply other threads:[~2026-09-11 15:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260910144914.8025-1-fmancera@suse.de>
2026-09-10 14:48 ` [PATCH 02/13 net-next] net: core: add IPv4 fallback stubs and guards for CONFIG_IPV4=n Fernando Fernandez Mancera
2026-09-10 14:48 ` [PATCH 04/13 net-next] net: tcp: move protocol agnostic TCP functions out of tcp_ipv4.c Fernando Fernandez Mancera
2026-09-10 14:48 ` [PATCH 06/13 net-next] net: udp: split IPv4 specific logic into udp_ipv4.c Fernando Fernandez Mancera
2026-09-11 15:15 ` sashiko-bot [this message]
2026-09-10 14:48 ` [PATCH 08/13 net-next] net: ping: split IPv4 specific logic into ping_ipv4.c Fernando Fernandez Mancera
2026-09-10 14:48 ` [PATCH 09/13 net-next] net: fib: split common nexthop logic to fib_core.c Fernando Fernandez Mancera
2026-09-11 15:15 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260911151537.BB9111F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=fmancera@suse.de \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox