From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
To: khorenko@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 v2 06/10] ms/mptcp: allow subflow rcv wnd to shrink
Date: Mon, 16 Nov 2026 05:49:13 +0200 [thread overview]
Message-ID: <20261116035204.564416-7-eva.kurchatova@virtuozzo.com> (raw)
In-Reply-To: <20261116035204.564416-1-eva.kurchatova@virtuozzo.com>
From: Paolo Abeni <pabeni@redhat.com>
In MPTCP connection, the `window` field in the TCP header refers to the
MPTCP-level rcv_nxt and it's right edge should not move backward. Such
constraint is enforced at DSS option generation time.
At the same time, the TCP stack ensures independently that the TCP-level
rcv wnd right's edge does not move backward. That in turn causes artificial
inflating of the MPTCP rcv window when the incoming data is acked at the
TCP level and is OoO in the MPTCP sequence space (or lands in the backlog).
As a consequence, the incoming traffic can exceed the receiver rcvbuf size
even when the sender is not misbehaving.
Prevent such scenario forcibly allowing the TCP subflow to shrink the
TCP-level rcv wnd regardless of the current netns setting.
Fixes: f3589be0c420 ("mptcp: never shrink offered window")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260602-net-mptcp-misc-fixes-7-1-rc7-v2-4-856831229976@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit da23be77e1292cd611e736c3aa17da633d7ddce7)
https://virtuozzo.atlassian.net/browse/VSTOR-153491
Feature: fix ms/net
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
net/mptcp/options.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 420fb529391d..f045b7d22317 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -567,6 +567,7 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb,
{
struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
struct mptcp_sock *msk = mptcp_sk(subflow->conn);
+ struct tcp_sock *tp = tcp_sk(sk);
unsigned int dss_size = 0;
struct mptcp_ext *mpext;
unsigned int ack_size;
@@ -615,6 +616,12 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb,
if (dss_size == 0)
ack_size += TCPOLEN_MPTCP_DSS_BASE;
+ /* The caller is __tcp_transmit_skb(), and will compute the new rcv
+ * wnd soon: ensure that the window can shrink.
+ */
+ if (skb)
+ tp->rcv_wnd = tp->rcv_nxt - tp->rcv_wup;
+
dss_size += ack_size;
*size = ALIGN(dss_size, 4);
--
2.56.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-16 3:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 3:49 [Devel] [PATCH hci-8.1 v2 00/10] ms/mptcp: stability fixes Eva Kurchatova
2026-11-16 3:49 ` [Devel] [PATCH hci-8.1 v2 01/10] ms/mptcp: fix retransmission loop when csum is enabled Eva Kurchatova
2026-11-16 3:58 ` no-reply
2026-11-16 3:49 ` [Devel] [PATCH hci-8.1 v2 02/10] ms/mptcp: move the retrans loop to a separate helper Eva Kurchatova
2026-11-16 3:55 ` no-reply
2026-11-16 3:49 ` [Devel] [PATCH hci-8.1 v2 03/10] ms/mptcp: move the stale logic out of retrans scheduler Eva Kurchatova
2026-11-16 3:56 ` no-reply
2026-11-16 3:49 ` [Devel] [PATCH hci-8.1 v2 04/10] ms/mptcp: let the retrans scheduler do its job Eva Kurchatova
2026-11-16 3:59 ` no-reply
2026-11-16 3:49 ` [Devel] [PATCH hci-8.1 v2 05/10] ms/mptcp: close TOCTOU race while computing rcv_wnd Eva Kurchatova
2026-11-16 3:59 ` no-reply
2026-11-16 3:49 ` Eva Kurchatova [this message]
2026-11-16 4:02 ` [Devel] [PATCH hci-8.1 v2 06/10] ms/mptcp: allow subflow rcv wnd to shrink no-reply
2026-11-16 17:09 ` Konstantin Khorenko
2026-11-16 3:49 ` [Devel] [PATCH hci-8.1 v2 07/10] ms/mptcp: explicitly drop over memory limits Eva Kurchatova
2026-11-16 4:03 ` no-reply
2026-11-16 17:09 ` Konstantin Khorenko
2026-11-16 3:49 ` [Devel] [PATCH hci-8.1 v2 08/10] ms/mptcp: implemented OoO queue pruning Eva Kurchatova
2026-11-16 4:04 ` no-reply
2026-11-16 3:49 ` [Devel] [PATCH hci-8.1 v2 09/10] ms/mptcp: being below memory limit is a likely() condition Eva Kurchatova
2026-11-16 4:03 ` no-reply
2026-11-16 3:49 ` [Devel] [PATCH hci-8.1 v2 10/10] ms/mptcp: avoid pruning for OoW data Eva Kurchatova
2026-11-16 4:04 ` no-reply
2026-11-16 17:09 ` [Devel] [PATCH hci-8.1 v2 00/10] ms/mptcp: stability fixes Konstantin Khorenko
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=20261116035204.564416-7-eva.kurchatova@virtuozzo.com \
--to=eva.kurchatova@virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.