[PATCH] mptcp: fix KMSAN: uninit-value in mptcp_established_options

From: Matthieu Baerts (NGI0)

Date: Mon May 04 2026 - 05:52:06 EST


Just to let syzbot testing it.

See Paolo's suggestion from [1].

Link: https://lore.kernel.org/6d342ef2-d480-4be6-afad-a3841cf205a8@xxxxxxxxxx [1]
Fixes: cfcceb7a39fc ("tcp: shrink per-packet memset in __tcp_transmit_skb()")
Reported-by: syzbot+ff020673c5e3d94d9478@xxxxxxxxxxxxxxxxxxxxxxxxx
Closes: https://lore.kernel.org/69f44505.050a0220.3cbe47.0008.GAE@xxxxxxxxxx
Suggested-by: Paolo Abeni <pabeni@xxxxxxxxxx>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
---
Cc: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
Cc: syzkaller-bugs@xxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
net/mptcp/options.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 8a1c5698983c..24903a12a4e0 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -583,6 +583,8 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb,
map_size += TCPOLEN_MPTCP_DSS_CHECKSUM;

opts->ext_copy = *mpext;
+ } else {
+ opts->ext_copy.use_map = 0;
}

dss_size = map_size;
--
2.53.0