From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, MPTCP Linux <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-net] mptcp: options: fix uninit-value in mptcp_write_data_fin
Date: Thu, 20 Aug 2026 18:03:57 +0200 [thread overview]
Message-ID: <ed014fca-ce98-4ea9-bf69-5fa328000877@kernel.org> (raw)
In-Reply-To: <0680b4cbbcb963684af9101936825fa09b71a335.camel@kernel.org>
Hi Geliang,
On 19/08/2026 11:09, Geliang Tang wrote:
> Hi Matt,
>
> On Fri, 2026-08-14 at 23:38 +0200, Matthieu Baerts (NGI0) wrote:
>> When sending a DATA_FIN without data, and because the DATA_FIN
>> occupies
>> 1 octet of the connection-level sequence space [1], it is then
>> required
>> to add a DSS mapping with specific values.
>>
>> If the checksum has been negotiated, it also needs to be computed,
>> and
>> included in the outgoing packet, and thus the initial csum data needs
>> to
>> be reset to 0 as well. This is no longer the case since commit
>> cfcceb7a39fc ("tcp: shrink per-packet memset in
>> __tcp_transmit_skb()"),
>> because the whole ext_copy structure is no longer zeroed by default.
>>
>> This seems to be the only case where use_map is changed and set
>> afterwards, so initialising the csum field only in this case, along
>> with
>> other fields for this specific case.
>
> Initially, I was wondering if we could skip calling mptcp_make_csum()
> for data_fin in mptcp_write_options(), similar to how we skip it for
> the infinite mapping:
>
> /* data_len == 0 is reserved for the infinite mapping,
> * the checksum will also be set to 0.
> */
> put_len_csum(mpext->data_len,
> (mpext->data_len ? mptcp_make_csum(mpext) : 0),
> ptr);
>
> But I realized that your modification is more straightforward.
>
>>
>> Fixes: cfcceb7a39fc ("tcp: shrink per-packet memset in
>> __tcp_transmit_skb()")
>> Link: https://datatracker.ietf.org/doc/html/rfc8684#section-3.3.3 [1]
>> Link:
>> https://sashiko.dev/#/patchset/20260812-net-next-mptcp-misc-feat-7-3-v1-0-1905a818f6cb%40kernel.org?part=2
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
> Looks good to me!
>
> Reviewed-by: Geliang Tang <geliang@kernel.org>
Thank you for the review!
New patches for t/upstream-net and t/upstream:
- fbdc41264992: mptcp: options: fix uninit-value in mptcp_write_data_fin
- Results: e9b9aadd7dfb..d251bdc7d65e (export-net)
- Results: 8cefef708ced..77661003be12 (export)
Tests are now in progress:
- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/439ace86ec3085a503e16283cf2719876d9a9d7e/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/7c1c363f2cd4fb1dbd7edb83dc2d57313289d200/checks
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
prev parent reply other threads:[~2026-08-20 16:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 21:38 [PATCH mptcp-net] mptcp: options: fix uninit-value in mptcp_write_data_fin Matthieu Baerts (NGI0)
2026-08-14 22:45 ` MPTCP CI
2026-08-19 9:09 ` Geliang Tang
2026-08-20 16:03 ` Matthieu Baerts [this message]
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=ed014fca-ce98-4ea9-bf69-5fa328000877@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox