From: Mat Martineau <martineau@kernel.org>
To: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Cc: MPTCP Linux <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-net v2] mptcp: options: handle MPC data + csum reqd + no csum
Date: Thu, 13 Aug 2026 18:48:03 -0700 (PDT) [thread overview]
Message-ID: <20f3ef05-aebd-84b0-55a6-8ed35c79d07b@kernel.org> (raw)
In-Reply-To: <20260805-mptcp-opt-mpc-csumreqd-no-csum-v2-1-dbb52e01a36d@kernel.org>
On Wed, 5 Aug 2026, Matthieu Baerts (NGI0) wrote:
> Before this modification, a remote peer could send an MP_CAPABLE with
> data, with the checksum flag set, but without adding the actual 2 bytes
> of checksum. As a result, uninitialised bytes could be used for the
> 'csum' field.
>
> That was not a critical issue, because this 'csum' field is only used to
> compare with the expected one, if previously negotiated in the 3WHS.
> Worst case, the checksum is likely wrong, a fallback is done without a
> reject if the negotiation was done earlier. That's OK.
>
> Yet, better to take the expected path with this case: only look at the
> checksum flag for MP_CAPABLEs not carrying a data-len.
>
> Such packet can be seen as a 3rd or 4th ACK. The RFC8684 mentions [1]
> that the 3rd packet should have the checksum flag set. When an MPC + ACK
> contains data, the checksum flag is redundant with the checksum field.
> It is not clear what should be done for the 4th ACK, nor if the flag has
> to be set if the checksum field is set.
>
> Therefore, it seems fine to only look at the presence of the checksum
> field, not to break the interaction with stacks that were not setting
> both.
>
> Fixes: 208e8f66926c ("mptcp: receive checksum for MP_CAPABLE with data")
> Link: https://datatracker.ietf.org/doc/html/rfc8684#section-3.1-23 [1]
> Closes: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260803-net-mptcp-misc-fixes-7-2-rc6-v2-0-b8f496d71664%40kernel.org?part=1
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> Changes in v2:
> - back to my pre-version, only set CSUMREQD for non MPC + ACK + DATA
> with a longer explanation about why it is OK. (Sashiko)
> - Link to v1: https://patch.msgid.link/20260805-mptcp-opt-mpc-csumreqd-no-csum-v1-1-cb2ad0b9feac@kernel.org
> ---
> net/mptcp/options.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index e1b38fe5faf8..73cec164d8bd 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -93,7 +93,8 @@ static void mptcp_parse_option(const struct sk_buff *skb,
> * In other words, the only way for checksums not to be used
> * is if both hosts in their SYNs set A=0."
> */
> - if (flags & MPTCP_CAP_CHECKSUM_REQD)
> + if ((flags & MPTCP_CAP_CHECKSUM_REQD) &&
> + opsize < TCPOLEN_MPTCP_MPC_ACK_DATA)
> mp_opt->suboptions |= OPTION_MPTCP_CSUMREQD;
>
> mp_opt->deny_join_id0 = !!(flags & MPTCP_CAP_DENY_JOIN_ID0);
>
> ---
> base-commit: 064fb643fcfcdddbad6da71da8f1ab206f018af7
> change-id: 20260805-mptcp-opt-mpc-csumreqd-no-csum-3f145fa19c4d
>
Yes, this looks like a good tradeoff between not breaking interaction with
other stacks while avoiding an invalid checksum.
Reviewed-by: Mat Martineau <martineau@kernel.org>
next prev parent reply other threads:[~2026-08-14 1:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 15:07 [PATCH mptcp-net v2] mptcp: options: handle MPC data + csum reqd + no csum Matthieu Baerts (NGI0)
2026-08-05 17:02 ` MPTCP CI
2026-08-14 1:48 ` Mat Martineau [this message]
2026-08-15 17:33 ` 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=20f3ef05-aebd-84b0-55a6-8ed35c79d07b@kernel.org \
--to=martineau@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@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 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.