Netdev List
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Jiayuan Chen <jiayuan.chen@linux.dev>,
	Yilin Zhang <yilinzhang@moonshot.ai>,
	Mat Martineau <martineau@kernel.org>
Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev,
	Kimi Security Team <bug-report@moonshot.ai>
Subject: Re: [PATCH] tcp: fastopen: check rsk_drop_req() in tcp_fastopen_create_child()
Date: Wed, 2 Sep 2026 17:31:21 +0200	[thread overview]
Message-ID: <fc4d4d8c-34af-4ea8-ace8-e10e547d6744@kernel.org> (raw)
In-Reply-To: <44162dd1-fec7-47be-bf48-186c69be6dd9@linux.dev>

Hi Jiayuan, Yilin,

Thank you for the patch and the review!

On 02/09/2026 16:12, Jiayuan Chen wrote:
> 
> on 9/2/26 8:12 PM, Yilin Zhang wrote:
>> subflow_syn_recv_sock() destroys the freshly cloned child for an MP_JOIN
>> SYN under the fatal fallback and hands it back with drop_req=true to
>> tell the caller to drop both the request and the child. Of the three
>> syn_recv_sock() callers, tcp_check_req() and the cookie path honor that
>> contract; tcp_fastopen_create_child() only checks child != NULL.
>>
>> With an MPTCP listener and server-side Fast Open enabled, this can
>> become a use-after-free:
>>
>>    1. fetch a TFO cookie,
>>    2. complete a normal MP_CAPABLE handshake to learn the server's key
>>       and compute the token offline,
>>    3. send an MP_JOIN SYN carrying that token and the valid TFO cookie,
>>    4. a subsequent accept() hands the freed socket to userspace, and
>>       any fd operation triggers slab-use-after-free, leading to a
>>       denial of service.

(...)

> BTW, since this is reported by LLM I think it is not difficult to have
> the LLM write a     reproducer and test this patch.

That would be great to use the MPTCP packetdrill fork for that:

  https://github.com/multipath-tcp/packetdrill/

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


  reply	other threads:[~2026-09-02 15:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 12:12 [PATCH] tcp: fastopen: check rsk_drop_req() in tcp_fastopen_create_child() Yilin Zhang
2026-09-02 14:12 ` Jiayuan Chen
2026-09-02 15:31   ` Matthieu Baerts [this message]
     [not found] <c4d4d8c-34af-4ea8-ace8-e10e547d6744@kernel.org>
2026-09-03  7:06 ` Yilin Zhang

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=fc4d4d8c-34af-4ea8-ace8-e10e547d6744@kernel.org \
    --to=matttbe@kernel.org \
    --cc=bug-report@moonshot.ai \
    --cc=jiayuan.chen@linux.dev \
    --cc=martineau@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