From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Xin Long <lucien.xin@gmail.com>,
Aaron Conole <aconole@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.1.y 1/4] openvswitch: use skb_ip_totlen in conntrack
Date: Wed, 19 Aug 2026 15:08:33 -0400 [thread overview]
Message-ID: <20260819190836.561493-1-sashal@kernel.org> (raw)
In-Reply-To: <2026081753-suffix-dill-686c@gregkh>
From: Xin Long <lucien.xin@gmail.com>
[ Upstream commit ec84c955a0d06cef31664bae328d94be7a3e2f03 ]
IPv4 GSO packets may get processed in ovs_skb_network_trim(),
and we need to use skb_ip_totlen() to get iph totlen.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Aaron Conole <aconole@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 8a7ed561671a ("net/sched: act_ct: fix sk_buff leak when the header checks reject a packet")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/openvswitch/conntrack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index e0ff87aaf979f..3bb361e70cdd4 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -1282,7 +1282,7 @@ static int ovs_skb_network_trim(struct sk_buff *skb)
switch (skb->protocol) {
case htons(ETH_P_IP):
- len = ntohs(ip_hdr(skb)->tot_len);
+ len = skb_ip_totlen(skb);
break;
case htons(ETH_P_IPV6):
len = sizeof(struct ipv6hdr)
--
2.53.0
next prev parent reply other threads:[~2026-08-19 19:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 12:43 FAILED: patch "[PATCH] net/sched: act_ct: fix sk_buff leak when the header checks" failed to apply to 6.1-stable tree gregkh
2026-08-19 19:08 ` Sasha Levin [this message]
2026-08-19 19:08 ` [PATCH 6.1.y 2/4] net: sched: use skb_ip_totlen and iph_totlen Sasha Levin
2026-08-19 19:08 ` [PATCH 6.1.y 3/4] openvswitch: move key and ovs_cb update out of handle_fragments Sasha Levin
2026-08-19 19:08 ` [PATCH 6.1.y 4/4] net/sched: act_ct: fix sk_buff leak when the header checks reject a packet Sasha Levin
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=20260819190836.561493-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=aconole@redhat.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=lucien.xin@gmail.com \
--cc=stable@vger.kernel.org \
/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