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 94F1E50257E; Wed, 30 Sep 2026 15:37:50 +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=1790782675; cv=none; b=QSfwIhyuClK/+L74B6JiQ9BIUzBOMQCA2eaD1ELPQBfBr8xYQ6YdfPuvs3c44+vOi7QAdS2IMlDWeVS1sKDe4ijr3P2kN6Y9mKAJfYURRKY5dvSMfHYD3wxwmWe+wPiYIZ1K005YAuXnCPGuGWFPc6L8xMElBIPoBsbFRgdVyjg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790782675; c=relaxed/simple; bh=yzYSpI064NLod9HmvEve2N5NRKv7Chhyic2/4COKiLA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D/dufH5IJ198FCMvofyRxEjjKvb+ODevjSLJGpNSf03pDHc2rR+BqHPiAJ9ok2JUpHHDyf6awgWOdAoNHEo7itMq+8H21WiMimXKXgt+kERS7A4OI/zdfQFZDom+k7G7DznpyH/OQt6AHdhKTlutWmYtQ4uOWBpmz3NFXNk2gss= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fzCsis3z; 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="fzCsis3z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10B181F000FF; Wed, 30 Sep 2026 15:37:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790782666; bh=f/l32nSlUFpu8jFjB/SjTrUkThOY355y2h/ijT+jtKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fzCsis3zoqZOtvdNQyR4fbXloaWSr3NpegITz4lAlu/ZYflU+5njZ4wIg8iVp7gwK L6clKKa0oxdTFZajDi3lmI5qVX0wWI/AnEENfhpGNCWUGH+bL93r5susOjQYSe76mQ BkacodQF8tVek/db9Zs/9tFCaLlWbAI4eOAUzM8Q= 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 5.10 128/595] net/sched: act_csum: dont mangle UDP tunnel GSO packets Date: Wed, 30 Sep 2026 17:20:21 +0200 Message-ID: <20260930152350.492363604@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152347.700140858@linuxfoundation.org> References: <20260930152347.700140858@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 5.10-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 107dc690de051..39836a30867fa 100644 --- a/net/sched/act_csum.c +++ b/net/sched/act_csum.c @@ -257,7 +257,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; /* @@ -313,7 +315,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