From 00e2690c9dad0e09cd2a4435b98de6d8efd5fbc2 Mon Sep 17 00:00:00 2001 From: "Matthieu Baerts (NGI0)" Date: Tue, 13 Oct 2026 19:56:39 +0200 Subject: [PATCH] mptcp: options: dss: avoid printing uninit csum When parsing the DSS suboption, this pr_debug() might read and print uninitialised checksum value. That's mostly harmless, but that's also confusing. Fixing that also avoids some tools to complain about accessing uninit data. So read this csum field only if it has been set. Note: this was initially reported by Clashiko as an existing issue. The code has been analysed by a human and confirmed. This is a non-urgent fix. Fixes: 390b95a5fb84 ("mptcp: receive checksum for DSS") Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20261013-net-next-mptcp-misc-feat-7-4-part2-v1-2-1181e5d2fda4@kernel.org Signed-off-by: Paolo Abeni --- net/mptcp/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 3b4a22846055..64aa7a516a23 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -259,7 +259,7 @@ static void mptcp_parse_option(const struct sk_buff *skb, pr_debug("data_seq=%llu subflow_seq=%u data_len=%u csum=%d:%u\n", mp_opt->data_seq, mp_opt->subflow_seq, mp_opt->data_len, !!(mp_opt->suboptions & OPTION_MPTCP_CSUMREQD), - mp_opt->csum); + (mp_opt->suboptions & OPTION_MPTCP_CSUMREQD) ? mp_opt->csum : 0); } break;