[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251014060454.1841122-1-edumazet@google.com>
Date: Tue, 14 Oct 2025 06:04:54 +0000
From: Eric Dumazet <edumazet@...gle.com>
To: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: Simon Horman <horms@...nel.org>, Willem de Bruijn <willemb@...gle.com>, netdev@...r.kernel.org,
eric.dumazet@...il.com, Eric Dumazet <edumazet@...gle.com>,
Michal Kubecek <mkubecek@...e.cz>, Sabrina Dubroca <sd@...asysnail.net>
Subject: [PATCH net] udp: drop secpath before storing an skb in a receive queue
Michal reported and bisected an issue after recent adoption
of skb_attempt_defer_free() in UDP.
We had the same issue for TCP, that Sabrina fixed in commit 9b6412e6979f
("tcp: drop secpath at the same time as we currently drop dst")
Many thanks to Michal and Sabrina.
Fixes: 6471658dc66c ("udp: use skb_attempt_defer_free()")
Reported-and-bisected-by: Michal Kubecek <mkubecek@...e.cz>
Closes: https://lore.kernel.org/netdev/gpjh4lrotyephiqpuldtxxizrsg6job7cvhiqrw72saz2ubs3h@g6fgbvexgl3r/
Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Cc: Sabrina Dubroca <sd@...asysnail.net>
---
net/ipv4/udp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 95241093b7f0..3f05ee70029c 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1709,6 +1709,8 @@ int __udp_enqueue_schedule_skb(struct sock *sk, struct sk_buff *skb)
int dropcount;
int nb = 0;
+ secpath_reset(skb);
+
rmem = atomic_read(&sk->sk_rmem_alloc);
rcvbuf = READ_ONCE(sk->sk_rcvbuf);
size = skb->truesize;
--
2.51.0.788.g6d19910ace-goog
Powered by blists - more mailing lists