From: Paolo Abeni <pabeni@redhat.com>
To: Matthieu Baerts <matttbe@kernel.org>,
Yilin Zhang <yilinzhang@moonshot.ai>
Cc: Mat Martineau <martineau@kernel.org>,
Jiayuan Chen <jiayuan.chen@linux.dev>,
netdev@vger.kernel.org, mptcp@lists.linux.dev,
Kimi Security Team <bug-report@moonshot.ai>
Subject: Re: [PATCH v3] mptcp: do not use Fast Open on MP_JOIN subflows
Date: Mon, 21 Sep 2026 17:55:04 +0200 [thread overview]
Message-ID: <890795c7-f9f9-4725-9c2b-bb345f627fc5@redhat.com> (raw)
In-Reply-To: <aa299737-002e-43b4-ad1e-881720798470@kernel.org>
On 9/21/26 11:43, Matthieu Baerts wrote:
> 20 Sept 2026 08:19:21 Yilin Zhang <yilinzhang@moonshot.ai>:
>> tcp_fastopen_create_child() hands the SYN packet itself to
>> subflow_syn_recv_sock(). For an MP_JOIN request this takes the
>> fatal fallback: the cloned child is destroyed and handed back with
>> drop_req flagged, but tcp_fastopen_create_child() does not check
>> the flag and queues it, so accept() can expose the freed child.
>>
>> MP_JOIN cannot use Fast Open: data on a subflow requires the
>> completed HMAC exchange (RFC 8684, sec. 3.2). Refuse it (only the
>> TFO path passes a SYN skb here) and let tcp_conn_request() fall
>> back to the regular MP_JOIN handshake; also strip the Fast Open
>> cookie from MP_JOIN SYN/ACKs.
>>
>> Fixes: 90bf45134d55 ("mptcp: add new sock flag to deal with join subflows")
>> Reported-by: Kimi Security Team <bug-report@moonshot.ai>
>> Suggested-by: Jiayuan Chen <jiayuan.chen@linux.dev>
>> Suggested-by: Paolo Abeni <pabeni@redhat.com>
>> Suggested-by: Matthieu Baerts <matttbe@kernel.org>
>> Signed-off-by: Yilin Zhang <yilinzhang@moonshot.ai>
>> ---
>> v3:
>> - refuse TFO for MP_JOIN in subflow_syn_recv_sock() and fall back to
>> the regular handshake; the TCP-side hunks from v2 are dropped
>> - strip the TFO cookie from MP_JOIN SYN/ACKs
>
> Thank you for the V3.
>
> Please start a new thread when sending a new version.
>
>> v2:
>> - https://lore.kernel.org/netdev/20260903094010.4066892-1-yilinzhang@moonshot.ai/
>> v1:
>> - https://lore.kernel.org/netdev/20260902121247.3248539-1-yilinzhang@moonshot.ai/
>>
>> net/mptcp/subflow.c | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
>> index af81ad5..2b454d4 100644
>> --- a/net/mptcp/subflow.c
>> +++ b/net/mptcp/subflow.c
>> @@ -348,6 +348,10 @@ static void subflow_prep_synack(const struct sock *sk, struct request_sock *req,
>> if (foc && foc->len > -1)
>> ireq->tstamp_ok = 0;
>>
>> + /* MP_JOIN cannot use TFO, do not send a cookie in the SYN/ACK */
>> + if (foc && mptcp_subflow_rsk(req)->mp_join)
>> + foc->len = -1;
>
> This should go above the previous block, not to disable TCP timestamps
> in this case.
I'm sorry for lagging behind on this thread.
I think this is not the correct approach.
AFAICS only pktdrill or similar can send MPJ TFO; there is no gain in
keeping such subflows open, and some potential risks. IMHO this too
similar to the disconnect()/ADDR_FORM scenarios to embark into the 'keep
the feature alive' path.
I suggest just resetting the TFO MPJ subflow and avoid other possible
follow-ups.
@Yilin, please wait for agreement on this point before sending a new
revision.
Thanks,
Paolo
prev parent reply other threads:[~2026-09-21 15:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 9:40 [PATCH v2] tcp: fastopen: check rsk_drop_req() in tcp_fastopen_create_child() Yilin Zhang
2026-09-10 8:12 ` Paolo Abeni
2026-09-10 10:13 ` Matthieu Baerts
2026-09-10 12:15 ` Jiayuan Chen
2026-09-10 16:12 ` Matthieu Baerts
2026-09-11 2:25 ` Jiayuan Chen
2026-09-11 6:42 ` Yilin Zhang
2026-09-11 9:33 ` Matthieu Baerts
2026-09-20 6:17 ` [PATCH v3] mptcp: do not use Fast Open on MP_JOIN subflows Yilin Zhang
2026-09-20 6:19 ` Yilin Zhang
2026-09-21 9:43 ` Matthieu Baerts
2026-09-21 15:55 ` Paolo Abeni [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=890795c7-f9f9-4725-9c2b-bb345f627fc5@redhat.com \
--to=pabeni@redhat.com \
--cc=bug-report@moonshot.ai \
--cc=jiayuan.chen@linux.dev \
--cc=martineau@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=yilinzhang@moonshot.ai \
/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