From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DA285372E0; Thu, 17 Sep 2026 17:02:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789664562; cv=none; b=eInHqsgrUXKEXkX2yW1USATc+nPTcZexjeL6F8U15THaj+q9gPNtTptsxP09LDkt5HSZeycI1uA/NLdUcdxFlHRe9dDJwvAUi6/X7c9wmv3UvTivKsm4sM0tr0pseVzPHsd7KzUiF9ukvOFIvxJ0vl0L8lCS+Yk81rVkIJBBDUs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789664562; c=relaxed/simple; bh=8tJr4Khka4t99UB4/zyjpUMzcgw5xC1qY7X0wewV2BQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BsAYoUoGujxQB1LPfvgtzHYL5+P4PE7kgOTr716USHbNZbA44grmN7CEVolDNiyyezsztyMe0+DSrGnh6LmgrVH8SNL5RcK50es+Z9lbFzjEoxXk7Bq/BEgZNWbJM8OQAtjrvxl2WS18kQzUBATxilVHnoVisjq5Plvp963AnwQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ycp3lC1S; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Ycp3lC1S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01A1F1F00893; Thu, 17 Sep 2026 17:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789664561; bh=kdTOCAti7Dm+7UO8slWjhqpGoaYPEMpOJVn+vd3MXuc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ycp3lC1Si3+E7tHPV6twE0Gwgsgra4VCHNDn/K5k/tKect5NaFSBoASwwzeFcByNt vUh2X/e7Z9MoJxM8FBTLcy2MMJtKpoHfhj8GIqQ2K1iJSYwgCzJpWPLBGu3KeGcw7s Kvib970Uf4rR96T9Zq1lbuOQfDvy13S2c+Wfn5+w= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alice Mikityanska , Davide Caratti , Willem de Bruijn , Paolo Abeni , Sasha Levin Subject: [PATCH 6.18 0413/1250] net/sched: act_csum: dont mangle UDP tunnel GSO packets Date: Thu, 17 Sep 2026 16:03:28 +0100 Message-ID: <20260917151603.218436175@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260917151551.901433442@linuxfoundation.org> References: <20260917151551.901433442@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alice Mikityanska [ Upstream commit 9bcb30b389ec5888590cb6ec58c7a3b80fe49a11 ] Similar to commit add641e7dee3 ("sched: act_csum: don't mangle TCP and UDP GSO packets"), UDP tunnel GSO packets going through act_csum shouldn't have their checksum calculated at this point, because it will be done after segmentation. Setting the checksum in act_csum modifies skb->ip_summed and prevents inner IP csum offload from kicking in, resulting in a packet with a bad checksum. Add UDP tunnel GSO packets to the exceptions, and also add UDP GSO (SKB_GSO_UDP_L4), as the same logic as in the commit mentioned above applies to UDP GSO too. Signed-off-by: Alice Mikityanska Reviewed-by: Davide Caratti Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20260611192955.604661-2-alice.kernel@fastmail.im Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- net/sched/act_csum.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/net/sched/act_csum.c b/net/sched/act_csum.c index 3a377604ad343..b6873f393aa33 100644 --- a/net/sched/act_csum.c +++ b/net/sched/act_csum.c @@ -259,7 +259,9 @@ static int tcf_csum_ipv4_udp(struct sk_buff *skb, unsigned int ihl, const struct iphdr *iph; u16 ul; - if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_UDP) + if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & + (SKB_GSO_UDP | SKB_GSO_UDP_L4 | + SKB_GSO_UDP_TUNNEL | SKB_GSO_UDP_TUNNEL_CSUM)) return 1; /* @@ -315,7 +317,9 @@ static int tcf_csum_ipv6_udp(struct sk_buff *skb, unsigned int ihl, const struct ipv6hdr *ip6h; u16 ul; - if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & SKB_GSO_UDP) + if (skb_is_gso(skb) && skb_shinfo(skb)->gso_type & + (SKB_GSO_UDP | SKB_GSO_UDP_L4 | + SKB_GSO_UDP_TUNNEL | SKB_GSO_UDP_TUNNEL_CSUM)) return 1; /* -- 2.53.0