From: Florian Westphal <fw@strlen•de>
To: Eric Dumazet <edumazet@google•com>
Cc: Michal Kubecek <mkubecek@suse•cz>,
Paolo Abeni <pabeni@redhat•com>,
Sabrina Dubroca <sd@queasysnail•net>,
"David S . Miller" <davem@davemloft•net>,
Jakub Kicinski <kuba@kernel•org>, Simon Horman <horms@kernel•org>,
Willem de Bruijn <willemb@google•com>,
netdev@vger•kernel.org, eric.dumazet@gmail•com
Subject: Re: [PATCH net] udp: drop secpath before storing an skb in a receive queue
Date: Tue, 14 Oct 2025 15:40:15 +0200 [thread overview]
Message-ID: <aO5Sv9GEEPl6zAE5@strlen.de> (raw)
In-Reply-To: <CANn89iKQYN1qTZoSW4+1v6scDgH53zi9pP_O_mEbTdYQYie1uQ@mail.gmail.com>
Eric Dumazet <edumazet@google•com> wrote:
> Thanks for testing. I will follow Sabrina suggestion and send :
>
> diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
> index 95241093b7f0..d66f273f9070 100644
> --- a/net/ipv4/udp.c
> +++ b/net/ipv4/udp.c
> @@ -1851,8 +1851,13 @@ void skb_consume_udp(struct sock *sk, struct
> sk_buff *skb, int len)
> sk_peek_offset_bwd(sk, len);
>
> if (!skb_shared(skb)) {
> - if (unlikely(udp_skb_has_head_state(skb)))
> - skb_release_head_state(skb);
> + /* Make sure that this skb has no dst, destructor
> + * or conntracking parts, because it might stay
> + * in a remote cpu list for a very long time.
> + */
> + DEBUG_NET_WARN_ON_ONCE(skb_dst(skb));
> + DEBUG_NET_WARN_ON_ONCE(skb->destructor);
> + DEBUG_NET_WARN_ON_ONCE(skb_nfct(skb));
> skb_attempt_defer_free(skb);
Are there cases where we expect to pass skb which violate this to
skb_attempt_defer_free()?
If no, then maybe move existing checks in skb_attempt_defer_free() up and
apped the skb_nfct check there so syzbot can blame other offenders too.
next prev parent reply other threads:[~2025-10-14 13:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 6:04 [PATCH net] udp: drop secpath before storing an skb in a receive queue Eric Dumazet
2025-10-14 6:37 ` Sabrina Dubroca
2025-10-14 6:54 ` Eric Dumazet
2025-10-14 7:32 ` Paolo Abeni
2025-10-14 7:43 ` Eric Dumazet
2025-10-14 8:01 ` Eric Dumazet
2025-10-14 8:06 ` Eric Dumazet
2025-10-14 8:27 ` Eric Dumazet
2025-10-14 8:55 ` Paolo Abeni
2025-10-14 11:20 ` Michal Kubecek
2025-10-14 11:34 ` Eric Dumazet
2025-10-14 13:18 ` Michal Kubecek
2025-10-14 13:40 ` Florian Westphal [this message]
2025-10-14 13:58 ` Eric Dumazet
2025-10-14 8:28 ` Sabrina Dubroca
2025-10-14 8:33 ` Eric Dumazet
2025-10-14 7:45 ` Sabrina Dubroca
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=aO5Sv9GEEPl6zAE5@strlen.de \
--to=fw@strlen$(echo .)de \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=eric.dumazet@gmail$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=kuba@kernel$(echo .)org \
--cc=mkubecek@suse$(echo .)cz \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=sd@queasysnail$(echo .)net \
--cc=willemb@google$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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