From: Simon Horman <horms@kernel.org>
To: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Cc: mptcp@lists.linux.dev, Mat Martineau <martineau@kernel.org>,
Geliang Tang <geliang@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Florian Westphal <fw@strlen.de>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Arthur Mongodin <amongodin@randorisec.fr>,
stable@vger.kernel.org
Subject: Re: [PATCH net 1/3] mptcp: Fix data stream corruption in the address announcement
Date: Wed, 19 Mar 2025 15:37:05 +0000 [thread overview]
Message-ID: <20250319153705.GB768132@kernel.org> (raw)
In-Reply-To: <20250314-net-mptcp-fix-data-stream-corr-sockopt-v1-1-122dbb249db3@kernel.org>
On Fri, Mar 14, 2025 at 09:11:31PM +0100, Matthieu Baerts (NGI0) wrote:
> From: Arthur Mongodin <amongodin@randorisec.fr>
>
> Because of the size restriction in the TCP options space, the MPTCP
> ADD_ADDR option is exclusive and cannot be sent with other MPTCP ones.
> For this reason, in the linked mptcp_out_options structure, group of
> fields linked to different options are part of the same union.
>
> There is a case where the mptcp_pm_add_addr_signal() function can modify
> opts->addr, but not ended up sending an ADD_ADDR. Later on, back in
> mptcp_established_options, other options will be sent, but with
> unexpected data written in other fields due to the union, e.g. in
> opts->ext_copy. This could lead to a data stream corruption in the next
> packet.
>
> Using an intermediate variable, prevents from corrupting previously
> established DSS option. The assignment of the ADD_ADDR option
> parameters is now done once we are sure this ADD_ADDR option can be set
> in the packet, e.g. after having dropped other suboptions.
>
> Fixes: 1bff1e43a30e ("mptcp: optimize out option generation")
> Cc: stable@vger.kernel.org
> Suggested-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Arthur Mongodin <amongodin@randorisec.fr>
> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> [ Matt: the commit message has been updated: long lines splits and some
> clarifications. ]
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-03-19 15:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 20:11 [PATCH net 0/3] mptcp: fix data stream corruption and missing sockopts Matthieu Baerts (NGI0)
2025-03-14 20:11 ` [PATCH net 1/3] mptcp: Fix data stream corruption in the address announcement Matthieu Baerts (NGI0)
2025-03-19 15:37 ` Simon Horman [this message]
2025-03-19 15:39 ` Simon Horman
2025-03-14 20:11 ` [PATCH net 2/3] mptcp: sockopt: fix getting IPV6_V6ONLY Matthieu Baerts (NGI0)
2025-03-19 15:38 ` Simon Horman
2025-03-19 16:26 ` Matthieu Baerts
2025-03-20 12:55 ` Paolo Abeni
2025-03-20 12:58 ` Simon Horman
2025-03-14 20:11 ` [PATCH net 3/3] mptcp: sockopt: fix getting freebind & transparent Matthieu Baerts (NGI0)
2025-03-19 15:39 ` Simon Horman
2025-03-20 14:20 ` [PATCH net 0/3] mptcp: fix data stream corruption and missing sockopts patchwork-bot+netdevbpf
2025-03-21 18:10 ` patchwork-bot+netdevbpf
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=20250319153705.GB768132@kernel.org \
--to=horms@kernel.org \
--cc=amongodin@randorisec.fr \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=geliang@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).