MPTCP Linux Development
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Cc: Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-next v3] mptcp: fix skb_ext leak in fallback mode
Date: Wed, 2 Sep 2026 12:20:03 +0200	[thread overview]
Message-ID: <19934016-686b-45f1-91de-8ff29e5a7a06@kernel.org> (raw)
In-Reply-To: <6e4266b0dc3eb7e68f0064e16fa9921f46b85319.1788338252.git.tanggeliang@kylinos.cn>

Hi Geliang,

On 02/09/2026 10:39, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> In fallback mode, MPTCP sockets behave as plain TCP and should not allocate
> SKB_EXT_MPTCP for transmitted skbs. The current code unconditionally
> allocates the extension, causing memory leaks when skbs are freed without
> releasing it.

I'm surprised by this. Do you have kmemleak reports?

Or is it linked to this issue?

  https://github.com/multipath-tcp/mptcp_net-next/issues/583

I'm asking because I would think that such issues would have been caught
by kmemleak, plus the fix is quite invasive.

> Fix by short-circuiting __mptcp_add_ext() in fallback mode and skipping all
> DSS bookkeeping in mptcp_sendmsg_frag(). Also allow TCP coalescing when
> mpext is NULL in fallback mode.
> 
> This latent bug will be exposed once TLS ULP support is added to fallback
> MPTCP sockets, as each sendmsg via the TLS path would leak one skb_ext
> object.

Do you mean this bug is only visible with the new feature? If yes, then
no need to threat it as a fix.

Then, I'm also wondering if this patch shouldn't be specific to this
case: maybe less code should be modified to deal with fallback sockets
once this happens? (I'm probably missing context to really help here)

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  parent reply	other threads:[~2026-09-02 10:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02  8:39 [PATCH mptcp-next v3] mptcp: fix skb_ext leak in fallback mode Geliang Tang
2026-09-02  9:55 ` MPTCP CI
2026-09-02 10:20 ` Matthieu Baerts [this message]
2026-09-11 23:07   ` Geliang Tang

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=19934016-686b-45f1-91de-8ff29e5a7a06@kernel.org \
    --to=matttbe@kernel.org \
    --cc=geliang@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=tanggeliang@kylinos.cn \
    /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