From: Stanislav Fomichev <sdf.kernel@gmail.com>
To: Mina Almasry <almasrymina@google.com>
Cc: netdev@vger.kernel.org, Eric Dumazet <edumazet@kernel.org>,
Neal Cardwell <ncardwell@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
linux-kernel@vger.kernel.org, Josef Bacik <josef@toxicpanda.com>,
Kaiyuan Zhang <kaiyuanz@google.com>,
Willem de Bruijn <willemb@google.com>,
Bobby Eshleman <bobbyeshleman@meta.com>,
Stanislav Fomichev <sdf@fomichev.me>,
Pavel Begunkov <asml.silence@gmail.com>,
Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH net-next v5 3/3] tcp: propagate skb_zcopy() uarg in tcp_mtu_probe()
Date: Wed, 18 Nov 2026 15:16:55 -0800 [thread overview]
Message-ID: <av4x4oM-xxCmymSg@devvm16445.scu0.facebook.com> (raw)
In-Reply-To: <20261115004003.3695475-4-almasrymina@google.com>
On 11/15, Mina Almasry wrote:
> tcp_clone_payload() takes references on source skb fragments when
> building an MTU probe skb, but never attaches the source skb's zerocopy
> ubuf_info (uarg) to the probe skb. When tcp_mtu_probe() subsequently
> frees fully consumed source skbs via tcp_eat_one_skb(), skb_release_data()
> drops their uarg references and can deliver the zerocopy completion to
> userspace while the unacknowledged probe skb still references the user
> buffers.
>
> Additionally, tcp_can_coalesce_send_queue_head() only checks
> skb_pure_zcopy_same() (which compares SKBFL_PURE_ZEROCOPY), allowing
> adjacent zerocopy skbs with different uargs (or a mixed-zerocopy skb and
> a non-zerocopy skb) to be coalesced into a single probe skb that can
> only hold one destructor_arg.
>
> Reject coalescing across different skb_zcopy() uargs in
> tcp_can_coalesce_send_queue_head() and propagate the uarg to the probe
> skb via skb_zcopy_set() in tcp_clone_payload().
>
> This is a pre-existing issue found by manual code inspection and LLM
> review; it was not triggered in production. Verified with the net_core
> KUnit test suite; not tested on real hardware.
>
> Fixes: 736013292e3c ("tcp: let tcp_mtu_probe() build headless packets")
> Signed-off-by: Mina Almasry <almasrymina@google.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
prev parent reply other threads:[~2026-11-18 23:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-15 0:40 [PATCH net-next v5 0/3] net: prevent mixing incompatible memory providers in skbs Mina Almasry
2026-11-15 0:40 ` [PATCH net-next v5 1/3] net: fix skb->unreadable propagation in skb_split() and skb_shift() Mina Almasry
2026-11-15 0:40 ` [PATCH net-next v5 2/3] net: prevent mixing frags from different memory providers or bindings Mina Almasry
2026-11-16 19:05 ` Stanislav Fomichev
2026-11-16 20:05 ` Mina Almasry
2026-11-16 22:38 ` Stanislav Fomichev
2026-11-15 0:40 ` [PATCH net-next v5 3/3] tcp: propagate skb_zcopy() uarg in tcp_mtu_probe() Mina Almasry
2026-11-18 23:16 ` Stanislav Fomichev [this message]
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=av4x4oM-xxCmymSg@devvm16445.scu0.facebook.com \
--to=sdf.kernel@gmail.com \
--cc=almasrymina@google.com \
--cc=asml.silence@gmail.com \
--cc=bobbyeshleman@meta.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=josef@toxicpanda.com \
--cc=kaiyuanz@google.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=willemb@google.com \
/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