Article View: linux.kernel.netdev
Article #17690Re: [PATCH v1 net 3/8] tcp: Don't bypass GTSM check for reqsk.
From: Eric Dumazet
Date: Tue, 17 Nov 2026 08:45
Date: Tue, 17 Nov 2026 08:45
38 lines
10273 bytes
10273 bytes
Le mar. 17 nov. 2026 ร 06:35, Kuniyuki Iwashima <kuniyu@google.com> a รฉcrit :
>
> Since cited commits moved up TCP_NEW_SYN_RECV handling in
> tcp_v4_err() and tcp_v6_err(), ICMP messages bypass IP_MINTTL
> and IPV6_MINHOPCOUNT checks.
>
> The minimal repro is:
>
> --ip_version=ipv6
> 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
> +0 setsockopt(3, SOL_IPV6, 73, [255], 4) = 0
> +0 bind(3, ..., ...) = 0
> +0 listen(3, 10) = 0
> +0 < (ttl 255) S 0:0(0) win 65535 <mss 1440,nop,nop,sackOK>
> +0 > S. 0:0(0) ack 1 <mss 1440,nop,nop,sackOK>
> +0 < (ttl 1) icmp unreachable port_unreachable [0:0(0)]
> +0 < (ttl 255) . 1:1(0) ack 1 win 65535
> +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
> +0 accept(3, ..., ...) = 4
> +0 %{assert tcpi_state == TCP_ESTABLISHED}%
>
> Let's restore IP_MINTTL/IPV6_MINHOPCOUNT for reqsk.
>
> Fixes: 26e3736090e1 ("ipv4: tcp: handle ICMP messages on TCP_NEW_SYN_RECV request sockets")
> Fixes: 2215089b2244 ("ipv6: tcp: handle ICMP messages on TCP_NEW_SYN_RECV request sockets")
> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
> ---
Note the same bypass exists in the receive path : in tcp_v4_rcv() and
tcp_v6_rcv(), the TCP_NEW_SYN_RECV branch calls tcp_check_req() /
tcp_child_process() and returns before reaching the min_ttl /
min_hopcount check done after the process: label.
Reviewed-by: Eric Dumazet <edumazet@kernel.org>
Technical Details
Message-ID:
<CAL4WiipiADQzec6YVP6H0rQSzAXZCFdtZb2SemKTSAz0pzHs4Q@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365051-linux-kernel-netdev=dewy.ruReferences:
<20261117053543.84032-1-kuniyu@google.com> <20261117053543.84032-4-kuniyu@google.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-365051-linux-kernel-netdev=dewy.ru
From: edumazet@kernel.org (Eric Dumazet)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v1 net 3/8] tcp: Don't bypass GTSM check for reqsk.
Date: Tue, 17 Nov 2026 09:45:57 +0100
Organization: Usenet Network
Message-ID: <CAL4WiipiADQzec6YVP6H0rQSzAXZCFdtZb2SemKTSAz0pzHs4Q@mail.gmail.com>
References: <20261117053543.84032-1-kuniyu@google.com> <20261117053543.84032-4-kuniyu@google.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="2281409"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:6woHUubeRkcDD4bv7B7w4l0VhP4= sha256:ZJmnisQyrmMQDbGBwUwcX/XUdqEu+AxJCjy2AuXoHM0=
sha1:6WIrldE9yVA+zaQ1pBoXR0zWAyw= sha256:v28MZsUQS5x9UuF2zmp/aRI1QDACh/dZkAXYb9tuZSI=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 20289114E94; Tue, 17 Nov 2026 11:46:25 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.501
X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31
tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id Nex0R75SPFag;
Tue, 17 Nov 2026 11:46:20 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-365051-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id 9ACDA114E90; Tue, 17 Nov 2026 11:46:12 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sto.lore.kernel.org (Postfix) with ESMTP id BF56E6019F6; Tue, 17 Nov 2026 08:46:11 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1794905170;
b=XIZ6yysR0gvKRZpn9UnE7RZCATgrcdXkZ2UMe2AwAAdCUcabycnuMPKEC+c/jy8HRR3M
mikbBLvzifvp7qvjvm84/wQ7V+PJEd8BxJewUOlLFIwZSZ8HSKhvBscWtwTIrfomxmsUR
WcRkK78em+5Z94jEbofLG5IbWXj82bEAq2ul/973IIvhkt4prZiFImA1vryXFJIx2yWDI
OlgvXYj/CAqcH4uqJYNj+KwuuqXWrhET7qTiVP1mu34y1Qh4FNCKp/IEBy66MOV5fImmI
uNnV7zLJrIJzWff7FcRPvzcIkO0Yh/huw+7jE5wsIw7/NBVD6QxzqPx3XqK+FxqHdkQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794905170;
h=X-Original-To:Received:Received:DKIM-Signature:Received:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:X-Mailing-List:
List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
List-Owner:Precedence:MIME-Version:References:In-Reply-To:From:Date:
X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:Subject:To:Cc:
Content-Type:Content-Transfer-Encoding;
bh=xawi7Uuq6+vTz3RvKq975aO5+cbyf6BPdw9TlVQbPDI=;
b=xXJDIlVjmHnF7EhlXVboD4Oodsz2tioOPL0wccSAMUugMDyRZkYDP9BbaIx2F0NmOkbR
SZH9y7L4Jpa5yF3GVwYKa8J0lMjs/ngXMZiGiD1hQ+YugB1HnbRiM1mW6UVaV9AjzPc4i
chVtWEShx4Iwi0hiSy0SF2GIbUGPWoQgOgHSPTUXeZzGxJvb9kv9v221ZvRaVDi0XkzAp
8vEIb2HLyl83yBTZERuZAP2fmQ81HjD6LCwcuSPfjyLiGCRiprKiPcWi/3hfkiT/F3i82
+m3a5hXlUKZ6LJhaDGQAy+zG4NvWwqUZso1VZb55uja6FLULZozP9ZaRVybt+tdvsrg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=n8p4H3PH;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 489C0606A8A1;
Tue, 17 Nov 2026 08:46:10 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=n8p4H3PH
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794905169;
b=GHVlal3cBneNXfUsu/Zkrs8nK7IGBAlDGSmN6truCaTgtLMImcAuUrL4trw7CldHqeit
VtlQw4EIMo68PlBqjpAMLniXCGkZ/2XkpwIKXpLhB8UOMUpSfzXEAZLTowAG6pY+aItwu
j7kJNZ3lEr3iI/QJSsR9A9ZXzDpcxGZ/PZenzbyox8YQp+etAxJtyF9EuzcGNRwYPX70K
nyNiU5iuIu1GA/siMCodt1vKDDDmQtvgS1a2Kd1uKDNHv6DaRi3+L1SH3Ep98xb5dDyzc
tBv1j1KJEFdICrd6oHHt64DHvkccsXj+mbcSVUroN9uiOrjIvjO1ouz7eyKwq7O6hBg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794905169;
h=Received:DKIM-Signature:Received:X-Forwarded-Encrypted:
X-Gm-Message-State:X-Received:MIME-Version:References:In-Reply-To:
From:Date:X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:
Subject:To:Cc:Content-Type:Content-Transfer-Encoding;
bh=xawi7Uuq6+vTz3RvKq975aO5+cbyf6BPdw9TlVQbPDI=;
b=4nKGKCKH7MS3kqJjJBnDCEViaF7k4Ukv3wHJX5UjVLNfeguBoQEOsCbNhZ5TWAd0+VgU
s59fC8H5xNGLsQxXr7TihsZESnbGYyJixGL3Yz5X6DO6rEis5u86F73YAupJzQnac7PNF
mKh1/75kRhEIZCSPk8jYNe3ShZTt/4a5zcEJS6CRxRxX9XHQ5CaGAaDor0OQSAn6KUzca
Y1uBG5+1h1HZogJl/azwSfoGT34G1X0RdGjJcW2fxb9e0QYGrk7ZQtUpCrhnshI7Dwwsp
F3Txn4b8rqSUARLOSFFcw2hrRyQpt2fLpk/sJ/pcHxyT+3n1YKOdReEAtAcNIWcJwUg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=n8p4H3PH;
arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (prime256v1))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67C26606A884
for <netdev@vger.kernel.org>; Tue, 17 Nov 2026 08:46:09 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 333BE1F000C6
for <netdev@vger.kernel.org>; Tue, 17 Nov 2026 08:46:09 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
s=k20260515; t=1794905169;
bh=xawi7Uuq6+vTz3RvKq975aO5+cbyf6BPdw9TlVQbPDI=;
h=References:In-Reply-To:From:Date:Subject:To:Cc;
b=n8p4H3PHuVgGtFMbFSHbHLe1KJkTIZ3V5DwN2DDo/yZE4kOLRNhvYvoz/9qqJGoXF
Ti2rjiD+tTB0v2GSHhoSQlzA0ifg6swQ8sbZe2B9bbrkr8q4COg5XnU8QhU8awsGL7
Jrz6zrwST+zUkKEg7NXcegXEzjQLGK8cfNhlxUf1sg4eophmZ8mtgdKclAfHmL9TFQ
Zb4YahlbUZgCIfNe67coa40+Dr2Qrqn4M0dg9GH7v8xUWhFGrTmRaRemc4VQ1Mm3K/
Kujx/J6n70qSwGnLgL0MyjjftQn7JE6Pvn2MRciZ/dULnIniOynEBKE+WRlnKtO/x8
Cqx4NNYHnoI1w==
X-Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-48e2d5a69c4so2641035fac.3
for <netdev@vger.kernel.org>; Tue, 17 Nov 2026 00:46:09 -0800 (PST)
X-Forwarded-Encrypted: i=1; AL+hErErFjqHzQBJEl3W05RRMz6bt1wV5GbLI+81Do2sNGb6CrM454kX4163xQCHS9IJRFu2GwD2oho=@vger.kernel.org
X-Gm-Message-State: APuU4Z/80Qf2r6CJGfMx2RUF6Gkir1M/tC3Q8wTQ+lnh1tCe7/TkSe+r
4hv8blRCilMQEc9MRsZPoTRJuFANbxPqlQ5XtdYyv0+/l1ApQbYCCAyY7HvvLtBX3wRIWwXx11d
EBdZ05O1Sa+CpS4Ui1La6nXw5NG9HFY0=
X-Received: by 2002:a05:6870:3341:b0:475:e2e9:4f4c with SMTP id
586e51a60fabf-4afdf5e94admr11398602fac.26.1794905168531; Tue, 17 Nov 2026
00:46:08 -0800 (PST)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261117053543.84032-4-kuniyu@google.com>
X-Gmail-Original-Message-ID: <CAL4WiipiADQzec6YVP6H0rQSzAXZCFdtZb2SemKTSAz0pzHs4Q@mail.gmail.com>
X-Gm-Features: AclHuK97_lixUCY7LKxL9xHTxxQIOhkcBpVdtCxkJXTvAIiWxzqrGVi0RZW36AA
X-Cc: Neal Cardwell <ncardwell@google.com>, "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuni1840@gmail.com>, netdev@vger.kernel.org