Received: from smtp.wizmail.org (mx.wizmail.org [85.158.153.28]) (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 47A0025D208 for ; Sat, 18 Oct 2025 21:17:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.158.153.28 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760822244; cv=none; b=dIgFafFVCgtldUeXloFHAI9BgwYqK/0Vm6wtXwhYifLwWUlnuGDidc9gukHkZraGxBS/vGnQrqBJfJ+AYTM7eBRrk6etbTtG/PwyeIt6gRfmvi7UPaQbcd4oHEVAaUxFJ6OdzuUTnECL1Pfgh48ujyMU1OqmfUATm+nEeT6wabc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760822244; c=relaxed/simple; bh=KeOqy38l1DSjT2ZGfVO9VqGafeODB92UxZ4aPkO71pc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ICC3/WfSZ7MWaVpnHSnuLomeb7/fVRT66DxVhRN1JeUwiQLcLh7/J+TGiKrnKWg6dRkwjGiW9/50UFXBpvFwcCJcJ06u33nzTABPTFIYGTTL5KvUUP+K0MMMPOHVbRo5ZGDIfUqplgCeZho5ykKgn7U2vbPkkuwHM+YT4nXGdt8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wizmail.org; spf=none smtp.mailfrom=wizmail.org; dkim=permerror (0-bit key) header.d=wizmail.org header.i=@wizmail.org header.b=PAE6Csxt; dkim=pass (2048-bit key) header.d=wizmail.org header.i=@wizmail.org header.b=MkPyo3Qf; arc=none smtp.client-ip=85.158.153.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wizmail.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=wizmail.org Authentication-Results: smtp.subspace.kernel.org; dkim=permerror (0-bit key) header.d=wizmail.org header.i=@wizmail.org header.b="PAE6Csxt"; dkim=pass (2048-bit key) header.d=wizmail.org header.i=@wizmail.org header.b="MkPyo3Qf" DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=wizmail.org; s=e250621; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:Autocrypt:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version: Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive:Autocrypt; bh=f3tUYNNRtwt4zNALLY8K7qJsoG+wUbLhJxPgCKMIt+8=; b=PAE6CsxtgW0bjaXWJNNtIPRJeK M5BlyYRHh+YGvPx87cj1+eoyqlDa9Hd6waHU30Sg4XBQfJqr1dXQIgTdpHBQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=wizmail.org ; s=r250621; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:Autocrypt: From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:From:Sender: Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive:Autocrypt; bh=f3tUYNNRtwt4zNALLY8K7qJsoG+wUbLhJxPgCKMIt+8=; b=MkPyo3QfxosHA6tCC4fqgMnHn+ 45evxRXT+0Ooxdf4JpTJfb7PkGUt/BFRTSU1kNaMgGhaSlhX2Lyizn2w8WWbSUmhwOpSaEFi5Yw27 2yYqbFQYDF8ahgt2JI+mRjRa+FHgzJ3cwY6yTTvAlDmGODd8Yqome3hGIHWmwRTvT6BMWWrpzV6iJ TJkLC5z8CzATJyT6PnlTGn+7hRlGbhcC1jZUpv8L7SRX4DxVLaie8oA5gFUNpo11I85wRI2BwR0pd oT1e7l4YOb3e3z9gd91GjeaABDdRFcIjB+MBeFdkWEW3K5wIZyI332qiWvMqNRqjVnzfyTPH95hb9 eAOOQB8g==; Authentication-Results: wizmail.org; iprev=pass (hellmouth.gulag.org.uk) smtp.remote-ip=85.158.153.62; auth=pass (PLAIN) smtp.auth=jgh@wizmail.org Received: from hellmouth.gulag.org.uk ([85.158.153.62] helo=[192.168.0.17]) by wizmail.org (Exim 4.98.120) (TLS1.3) tls TLS_AES_128_GCM_SHA256 with esmtpsa id 1vAEIb-00000004ge1-4B2r (return-path ); Sat, 18 Oct 2025 21:17:14 +0000 Message-ID: <80bb29a8-290c-449e-a38d-7d4e47ce882e@wizmail.org> Date: Sat, 18 Oct 2025 22:17:12 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 net-next 1/4] tcp: Make TFO client fallback behaviour consistent. To: Kuniyuki Iwashima Cc: Neal Cardwell , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Simon Horman , Yuchung Cheng , Willem de Bruijn , Kuniyuki Iwashima , netdev@vger.kernel.org, Eric Dumazet References: <20251016040159.3534435-1-kuniyu@google.com> <20251016040159.3534435-2-kuniyu@google.com> From: Jeremy Harris Content-Language: en-GB Autocrypt: addr=jgh@wizmail.org; keydata= xsBNBFWABsQBCADTFfb9EHGGiDel/iFzU0ag1RuoHfL/09z1y7iQlLynOAQTRRNwCWezmqpD p6zDFOf1Ldp0EdEQtUXva5g2lm3o56o+mnXrEQr11uZIcsfGIck7yV/y/17I7ApgXMPg/mcj ifOTM9C7+Ptghf3jUhj4ErYMFQLelBGEZZifn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zpr1jd9hzCVjevOWMjOQfMt8FAmgeKicFCRZfl6wACgkQ vOWMjOQfMt8Bewf9F3xhidAAzCrlwceeSx16n82sSmtCopkoSp85++P6P3Nzt/erkqnhZY0Y OZM5xIBJU5ejKalb6aYB4OU7q20MfTerPo+XhuWDjKYb0RrMmekVsE4/V5sFCgdwkqjax1ZX Jk3/vkTRnpHtuKas9FxGxeyaJrsYBhJIgzcXAfN3zYRD+x6L/zNYzvvoEEH8dKIeKh0dEXg0 3p0VWJU8zfWo2NT+xeqYnG8OO2HAr9/D9Sw9W4HZ4csdWXOJ/GmnHYri9Q4RyrF8uH4fAxKr c1cFYEY84iaBog5uv3dti9vUit8XWyae8rTPC/QyAekgREvAJnISWxLQWWbOqd6TkoTqJw== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pcms-Received-Sender: hellmouth.gulag.org.uk ([85.158.153.62] helo=[192.168.0.17]) with esmtpsa On 2025/10/18 9:56 PM, Kuniyuki Iwashima wrote: >> In addition, a client doing this (SYN with cookie but no data) is granting >> permission for the server to respond with data on the SYN,ACK (before >> 3rd-ACK). > > As I quoted in patch 2, the server should not respond as such > for SYN without payload. > > https://datatracker.ietf.org/doc/html/rfc7413#section-3 > ---8<--- > Performing TCP Fast Open: > > 1. The client sends a SYN with data and the cookie in the Fast Open > option. > > 2. The server validates the cookie: > ... > 3. If the server accepts the data in the SYN packet, it may send the > response data before the handshake finishes. > ---8<--- In language lawyer terms, that (item 3 above) is a permission. It does not restrict from doing other things. In particular, there are no RFC 2119 key words (MUST NOT, SHOULD etc). I argue that once the server has validated a TFO cookie from the client, it is safe to send data to the client; the connection is effectively open. For traditional, non-TFO, connections the wait for the 3rd-ACK is required to be certain that the IP of the alleged client, given in the SYN packet, was not spoofed by a 3rd-party. For TFO that certainty is given by the cookie; the server can conclude that it has previously conversed with the source IP of the SYN. Alternately, one could read "the data" in that item 3 as including "zero length data"; the important part being accepting it. -- Cheers, Jeremy