[PATCH net v1 0/2] net: gro: add flush/flush_id checks and fix wrong offset in udp

From: Richard Gobert
Date: Fri Apr 12 2024 - 11:23:07 EST


This series fixes a bug in the complete phase of UDP in GRO, in which
socket lookup fails due to using network_header when parsing encapsulated
packets. The fix is to pass p_off (previous offset, offset to the start of
the previous layer) parameter in *_gro_complete.

The original series includes a change to a vxlan test which adds the local
parameter to prevent similar future bugs. I plan to submit it separately
to net-next.

In addition p->flush/flush_id should be checked in relevant UDP flows. Same
logic from tcp_gro_receive is applied for the relevant flows in
udp_gro_receive_segment.

This series is part of a previously submitted series to net-next:
https://lore.kernel.org/all/20240410153423.107381-1-richardbgobert@xxxxxxxxx/

Richard Gobert (2):
net: gro: add flush check in udp_gro_receive_segment
net: gro: add p_off param in *_gro_complete

drivers/net/geneve.c | 7 +++---
drivers/net/vxlan/vxlan_core.c | 11 ++++++----
include/linux/etherdevice.h | 2 +-
include/linux/netdevice.h | 3 ++-
include/linux/udp.h | 2 +-
include/net/gro.h | 11 +++++-----
include/net/inet_common.h | 2 +-
include/net/tcp.h | 6 ++++--
include/net/udp.h | 8 +++----
include/net/udp_tunnel.h | 2 +-
net/8021q/vlan_core.c | 4 ++--
net/core/gro.c | 2 +-
net/ethernet/eth.c | 4 ++--
net/ipv4/af_inet.c | 8 +++----
net/ipv4/fou_core.c | 9 ++++----
net/ipv4/gre_offload.c | 5 +++--
net/ipv4/tcp_offload.c | 7 +++---
net/ipv4/udp.c | 3 ++-
net/ipv4/udp_offload.c | 39 ++++++++++++++++++++++------------
net/ipv6/ip6_offload.c | 22 ++++++++++---------
net/ipv6/tcpv6_offload.c | 7 +++---
net/ipv6/udp.c | 3 ++-
net/ipv6/udp_offload.c | 13 ++++++------
23 files changed, 105 insertions(+), 75 deletions(-)

--
2.36.1