From: sashiko-bot@kernel.org
To: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH net 5/7] mptcp: push queued data on subflows falling back at the handshake
Date: Tue, 17 Nov 2026 22:09:16 +0000 [thread overview]
Message-ID: <sashiko-outbox-219731@kernel.org> (raw)
In-Reply-To: <20261116-net-mptcp-misc-fixes-7-4-rc4-v1-5-bf7656de653e@kernel.org>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] mptcp: incomplete fallback cleanup in
check_fully_established()
- [Medium] mptcp: spurious data push on incoming TCP RST in
check_fully_established()
--
commit c7b2d96469f365f0990144845b235e48664597ea
Author: Matthieu Baerts (NGI0) <matttbe@kernel.org>
mptcp: push queued data on subflows falling back at the handshake
This commit pushes pending MPTCP data in check_fully_established() when a
subflow falls back to TCP because the first packet after the handshake
carries no MP_CAPABLE option.
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index bcf3440d1901b..617358ff7f990 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -1035,6 +1035,10 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
> MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_FALLBACKFAILED);
> goto reset;
> }
> + /* this ACK will not reach the fallback path: push from here */
> + mptcp_data_lock(sk);
> + __mptcp_check_push(sk, ssk);
> + mptcp_data_unlock(sk);
> return false;
> }
[Severity: Medium]
Does returning false here after only calling __mptcp_check_push() leave
sent and newly pushed dfrags stranded in msk->rtx_queue?
When check_fully_established() returns false, mptcp_incoming_options()
returns immediately without running the rest of its fallback path:
net/mptcp/options.c:mptcp_incoming_options() {
...
if (__mptcp_check_fallback(msk)) {
mptcp_data_lock(subflow->conn);
if (sk_stream_memory_free(sk))
__mptcp_check_push(subflow->conn, sk);
/* on fallback we just need to ignore the msk-level snd_una, as
* this is really plain TCP
*/
__mptcp_snd_una_update(msk, READ_ONCE(msk->snd_nxt));
__mptcp_data_acked(subflow->conn);
mptcp_data_unlock(subflow->conn);
return !mptcp_over_limit(subflow->conn, sk, skb);
}
...
if (!check_fully_established(msk, sk, subflow, skb, &mp_opt))
return sk->sk_state != TCP_CLOSE;
}
Because __mptcp_snd_una_update() and __mptcp_data_acked() are skipped,
msk->snd_una is not advanced to msk->snd_nxt and dfrags in msk->rtx_queue
are not cleaned up or uncharged from sk->sk_wmem_queued until a later
packet arrives. If a sender fills sk->sk_sndbuf within the SYN+ACK window
and the peer's pure ACK without MPTCP options acknowledges all in-flight
TCP data while waiting for more payload, ssk's write queue empties while
sk->sk_wmem_queued on msk stays full and writers blocked in
sk_stream_wait_memory() or poll(POLLOUT) stall indefinitely. Also, if the
packet triggering fallback carries payload, mptcp_over_limit() is
bypassed.
[Severity: Medium]
Can this push queued data onto ssk in response to an incoming TCP RST?
When an in-sequence TCP RST arrives before the subflow is fully
established, tcp_validate_incoming() -> tcp_reset() calls
mptcp_incoming_options() while ssk->sk_state is still TCP_ESTABLISHED,
before tcp_done_with_error() closes the subflow. Because a RST carries no
MP_CAPABLE option, check_fully_established() falls back and calls
__mptcp_check_push(), transmitting queued data from msk->rtx_queue on the
subflow right before it is reset.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116-net-mptcp-misc-fixes-7-4-rc4-v1-0-bf7656de653e@kernel.org?part=5
next prev parent reply other threads:[~2026-11-17 22:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 22:06 [PATCH net 0/7] mptcp: misc fixes for v7.4-rc4 Matthieu Baerts (NGI0)
2026-11-16 22:06 ` [PATCH net 1/7] mptcp: do not use a raised snd_wnd for the send window Matthieu Baerts (NGI0)
2026-11-16 22:06 ` [PATCH net 2/7] mptcp: push pending data after a sendmsg copy fault Matthieu Baerts (NGI0)
2026-11-17 22:09 ` sashiko-bot
2026-11-17 22:29 ` netdev-bot+sashiko
2026-11-18 22:01 ` Matthieu Baerts
2026-11-16 22:06 ` [PATCH net 3/7] mptcp: use sk instead of casting msk in check_fully_established() Matthieu Baerts (NGI0)
2026-11-16 22:06 ` [PATCH net 4/7] mptcp: push queued data on passive TFO subflows becoming established Matthieu Baerts (NGI0)
2026-11-17 22:29 ` netdev-bot+sashiko
2026-11-18 22:02 ` Matthieu Baerts
2026-11-16 22:06 ` [PATCH net 5/7] mptcp: push queued data on subflows falling back at the handshake Matthieu Baerts (NGI0)
2026-11-17 22:09 ` sashiko-bot [this message]
2026-11-17 22:29 ` netdev-bot+sashiko
2026-11-18 22:02 ` Matthieu Baerts
2026-11-16 22:06 ` [PATCH net 6/7] mptcp: don't send a FIN before the pending data on fallback Matthieu Baerts (NGI0)
2026-11-17 22:09 ` sashiko-bot
2026-11-17 22:29 ` netdev-bot+sashiko
2026-11-18 22:03 ` Matthieu Baerts
2026-11-16 22:06 ` [PATCH net 7/7] mptcp: fix dummy mapping of overlapping segments Matthieu Baerts (NGI0)
2026-11-17 22:29 ` netdev-bot+sashiko
2026-11-18 22:04 ` Matthieu Baerts
2026-11-18 22:05 ` [PATCH net 0/7] mptcp: misc fixes for v7.4-rc4 Matthieu Baerts
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=sashiko-outbox-219731@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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