From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2546D3B388F for ; Mon, 29 Jun 2026 09:50:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782726648; cv=none; b=u1Dfjh8GBYbsAaqoc8smTXm16YayV3dcaAUuvxiRi3LxkWGCFab3v03Enx+LDuFI2a+HmcXHmN9wpYT+z3d54ze76ATjXNf750dIJjrMIP9J9VJj/EGtUaIA6tTMPPP2rwMfT9GW72ssslkC8umpCYNjoBt2QZQvYFGvaLjqbiA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782726648; c=relaxed/simple; bh=ACyWfY2kPQJljL8+3rbVUnFnxv3dYfoIVpzokml3Mws=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qZE37XDzDjIURy6EGI2snlOg7yC1M5D042B+4kWB/Dkfi124IZU4ZciUlCkfLrEMx4KZSjeLkQJEYVPqFe74/s7LPSIq9Dmgj9YD4h1ANez9k81pNx+amAKx8fBmTd5Y23EdEsI1Yti14F+DxMitF0Lm72hs9GE4V3E+NUSt/SA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Q450u376; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=e3uKCDuN; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Q450u376"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="e3uKCDuN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782726644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2/M9+nQY4UUFkdH/+tXgorDJKcJ/lXoZMGO1FuRWX8k=; b=Q450u376zI1IFwnQZApfhfu0cR3jt/B+FkPwk9Req6tlHhZZ18zu6rzfNufGz07Jb4oUbd oCO0Pq2VLNe2pEDQeTkhDa/9ye4glLpJR4ZeQUp8O36sdiVhuqRxgx08BGttuAeYRSL5hN af//eWA5NL+zoMcBghPuUAcDMSRUcpk= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-515-orRrgtsDPueCh6P9KhM1tQ-1; Mon, 29 Jun 2026 05:50:43 -0400 X-MC-Unique: orRrgtsDPueCh6P9KhM1tQ-1 X-Mimecast-MFC-AGG-ID: orRrgtsDPueCh6P9KhM1tQ_1782726642 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-47407691804so245674f8f.1 for ; Mon, 29 Jun 2026 02:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1782726642; x=1783331442; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=2/M9+nQY4UUFkdH/+tXgorDJKcJ/lXoZMGO1FuRWX8k=; b=e3uKCDuNAWpe/tvRHu1ckwAq7bpB0M9Bn6cMOnQh2aN8xoytIZhgCtlQodZ0quzqKi yJazW3X0cn9h0ncWzWlAdcbooCyPt4lfkdClIO4PBzk8q42Qf7MWQR4dtsfL91XHps9y sGRIanqAPwGKngaWcpUpCNyGksb59g6fmfDW3YoHIeXPW6PUwfTHCco2hcFThkOmutNf kKpQ/Jxd+k5SU2yipmGpjisXxRPr86XG/sfBQftXuWeDl5RD/5X0fPNnIzb6gF1kK9QZ uCe/Zlg98JALza1I5p8BNi1xWEguY++IyW5LuvCu1PPKoz/TEpaZqyG04fZONaBAPW69 FT9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782726642; x=1783331442; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2/M9+nQY4UUFkdH/+tXgorDJKcJ/lXoZMGO1FuRWX8k=; b=GU6kcs8ikqWM/7sCBr8YLff6tt/EULlRnlzgVUID2h87+QKnAWxVkFkk3LmaNsZJCV WMdF7T3iujZkXhGypFS9VpW+bbHIgMA989tI5l4zMpGrK3rxvMch0B+SDDpejIynFPhp mhZvKv9ZhremazNSwIecvMFpmck0wO6pK4nVMqEq4MDUN18JmiGSqrO1xaIRxEola/Kc 9DxlGtx75/GhqtlfPOUtodcxptEavZlsp+EyS+eKIyu1Q2fW0A48xsBabGX3FiDBP2uy JKArAvDnQXUIUDUMNuCWOSeYCuzio62HCX47WLMF4cFSn61VxT7BLFjOMcoTR9VNq/Zw ylBw== X-Forwarded-Encrypted: i=1; AHgh+RqYTLncbWaHXQ3Gl2jQRBlzerfwN0NdrxlH3LsaKmfrVBJo1DvMEEEUJpVtydfoV/kYnM4pngTIW9YWBNc=@vger.kernel.org X-Gm-Message-State: AOJu0YwD1SgctGz6CvxbqHQLFMD45+zFZCxNRxyATgORkyhKpEFHARxD OLzA880zsJ2Gnia2vkTq+v2CZbGGNh1qUY8bEFESdXgwVJqLwmkxKymI8tpHyKqZjAlftrPvxMc 2EtpcznCYG8IvhG5T8MK1BOQInC40SbyWhXxJ1jTkplY4KpAp0TYmR4CCYi3IKgNJ1C2ukr9MnA == X-Gm-Gg: AfdE7ck63avrLtqycI1C6nstUp89W7RVN0ajKp8pzlNwcIi3rah+CBDaHmmFFBlavRS RK0nSeGgePkxDBEOmWOAqWmjL0Jv1OuasSmq3aKuTvF6dBGbMNZKgqmcB8u9mv9ktA/KhCfNTym hDQQzb7HKTKzN08+VIuchJ2PI3M0GyxO1hyLaorcvoleQJzi5W6QfkxPqjZZLZhKIWpoaUcopeN UFAcoklxXu9DMDwFJaWwsfIy1Xh/Jt6CHDG2nLTvZ7pNGJqbSE6dTNelMZCoSLl90e12+cYgN1Z Gh3h6NSrT/JIX8DTuRPzjIUKUM4NLvyKuDELcJeG6igN+1fLHhaX8SY6F9/PIO4kSyZGrDzFrgJ ooUdXqgNlZpU+yBcK1Rym9QCJkt1MuVTQJqkuGi4N2oChFLv0Yc06y863MLsN2dmmEIszUegnPn aFOX1zxoQsXA== X-Received: by 2002:a05:6000:29db:b0:45d:3aa3:7f76 with SMTP id ffacd0b85a97d-46dc14cbf6emr18737568f8f.33.1782726642097; Mon, 29 Jun 2026 02:50:42 -0700 (PDT) X-Received: by 2002:a05:6000:29db:b0:45d:3aa3:7f76 with SMTP id ffacd0b85a97d-46dc14cbf6emr18737529f8f.33.1782726641633; Mon, 29 Jun 2026 02:50:41 -0700 (PDT) Received: from ?IPV6:2a0d:3344:5521:6b10:2eb7:f61a:75:4534? ([2a0d:3344:5521:6b10:2eb7:f61a:75:4534]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-46f9db29a94sm27551970f8f.22.2026.06.29.02.50.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Jun 2026 02:50:40 -0700 (PDT) Message-ID: <3ad5bba8-18b9-48a6-94e0-99d958f23984@redhat.com> Date: Mon, 29 Jun 2026 11:50:38 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mptcp: only honor zero-length DATA_FIN when a mapping is present To: Michael Bommarito , Matthieu Baerts , Mat Martineau Cc: Geliang Tang , Eric Dumazet , Jakub Kicinski , mptcp@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260617215725.1116295-1-michael.bommarito@gmail.com> Content-Language: en-US From: Paolo Abeni In-Reply-To: <20260617215725.1116295-1-michael.bommarito@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/17/26 11:57 PM, Michael Bommarito wrote: > mptcp_get_options() initializes only the status group of struct > mptcp_options_received; data_seq, subflow_seq and data_len are set by > mptcp_parse_option() only inside the DSS mapping block, which runs when > the DSS M (mapping present) bit is set. > > A peer can send a DSS option with DATA_FIN set but the mapping bit clear. > The parser then sets mp_opt.data_fin while leaving data_len and data_seq > uninitialized, and for a zero-length segment mptcp_incoming_options() > reads them; KMSAN reports an uninit-value in mptcp_incoming_options(). > > Impact: a remote peer that has completed the MPTCP handshake makes > mptcp_incoming_options() read uninitialized data_len and data_seq (KMSAN > uninit-value) by sending a DSS option with DATA_FIN set and the mapping > bit clear. > > A DATA_FIN is always sent with a mapping (mptcp_write_data_fin()), so > gating this path on the mapping bit drops only the malformed no-map case > and leaves valid DATA_FIN handling unchanged. > > Fixes: 43b54c6ee382 ("mptcp: Use full MPTCP-level disconnect state machine") > Cc: stable@vger.kernel.org > Assisted-by: Claude:claude-opus-4-8 > Signed-off-by: Michael Bommarito Isn't this fixed by commit 5e939544f9d2 ("mptcp: fix uninit-value in mptcp_established_options") ? /P