๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18499

Re: [BUG] tcp: shift-out-of-bounds in inet_csk_rto_backoff() for an orphaned zero-window probe

#18499
From: Eric Dumazet
Date: Wed, 18 Nov 2026 12:12
59 lines
11081 bytes
Le mer. 18 nov. 2026 ร  11:59, Kyuwon Cho <kyuwoncho18@gmail.com> a รฉcrit :
>
> Hi Eric, Neal,
>
> While testing v7.4-rc3 with an LLM-guided test generator that we are
> developing as a research prototype, we found that an orphaned socket
> that keeps sending zero-window probes makes inet_csk_rto_backoff()
> shift by 64 or more. An unprivileged user can set this up in its own
> user and network namespace:

Thanks for the report and the reproducer.

This is a known issue, a fix is under review:

[PATCH net v2 2/2] tcp: fix shift-out-of-bounds in inet_csk_rto_backoff()
https://lore.kernel.org/netdev/20261026123244.239766-2-jiayuan.chen@linux.dev/

It limits the shift to 32 in inet_csk_rto_backoff() itself, so it
covers both callers: tcp_ld_RTO_revert(), which is where Jiayuan hit
the splat, and the orphan check in tcp_probe_timer() from your report.

> We found no earlier report of this call site.

Searching lore for the function name would have found it:

https://lore.kernel.org/netdev/?q=inet_csk_rto_backoff

Please do this before sending a report, especially for findings
coming from automated tools.

Note that the netns sysctls are not needed. tcp_retransmit_timer()
increments icsk_backoff without any limit, so TCP_USER_TIMEOUT and
TCP_RTO_MAX_MS on a socket with a silent peer are enough to get
icsk_backoff above 63, then an ICMP unreachable reaches the shift
from tcp_ld_RTO_revert().

> On x86 the shift count is masked, so from 64 on alive can come out true
> again and the orphan keeps probing instead of being aborted.

Right, and this starts before 64: with icsk_rto == 200, the u64
is already zero when icsk_backoff reaches 61.

Jiayuan, I have not seen a v3 addressing Neal's feedback.

When you send it, could you please add:

Reported-by: Kyuwon Cho <kyuwoncho18@gmail.com>
Closes: https://lore.kernel.org/netdev/179499954853.1440581.6627074959099619480@gmail.com/

and mention the zero window probe path in the changelog ?

Kyuwon, it would be nice if you could test Jiayuan's patch with your
reproducer and send a Tested-by: tag in that thread.

Thanks.
Technical Details
Message-ID: <CAL4WiiouZZ46QRp5K6MYK=vevKXYLzd_p049qVVf=w+9L8d96Q@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366105-linux-kernel-netdev=dewy.ru
References: <179499954853.1440581.6627074959099619480@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366105-linux-kernel-netdev=dewy.ru
From: edumazet@kernel.org (Eric Dumazet)
Newsgroups: linux.kernel.netdev
Subject: Re: [BUG] tcp: shift-out-of-bounds in inet_csk_rto_backoff() for an
 orphaned zero-window probe
Date: Wed, 18 Nov 2026 13:12:45 +0100
Organization: Usenet Network
Message-ID: <CAL4WiiouZZ46QRp5K6MYK=vevKXYLzd_p049qVVf=w+9L8d96Q@mail.gmail.com>
References: <179499954853.1440581.6627074959099619480@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="2588755"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:BQ40tHu0LhquflGAblCgU/wyVCc= sha256:pcIVs2z9FRh8TD6Rltws6ZxBqjKti/QRttgpT5L530M=
	sha1:z88GDf43pZ5iGQ2ecDmIfn0QvrY= sha256:asd70y7TkN94SCr05OFo/mm0aGf+t114gDanOozcmxI=
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 58F97115289; Wed, 18 Nov 2026 15:13:20 +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 YdJnNfEjny-d;
	Wed, 18 Nov 2026 15:13:09 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-366105-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 86CF81151F8; Wed, 18 Nov 2026 15:13:00 +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 A7305611CA8; Wed, 18 Nov 2026 12:12:59 +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=1795003979;
	b=GZcAWCnzFMToqhPPGOu9Gc0bCTw7GDHVrg4SSdXVUJqmeYgbzW+TNrGouehd+iitAdYq
	 11LiHhic8Xnj6FPaJycZ8BD7wuMisxRof0U02e/h6QRYYtlSIQTI/ziXREYHFNBmSKzA1
	 Gx4NzKxuISrJpanojYumMrp+mcXuMOY51Et+RDvQhm1fDfGARO9G5QCVtvPh9nfCpe25D
	 E5qll3k1BHHBMTrPpwVPR7Sfn4w2ihdkr8fHVWYrsWA0VAxLy+hWMMLENYbxf+Tt61lIm
	 RnHBdsZg58HOl42+LD6gp9VNTvTiNDPrgd4uMeSl0f+o7z+aJNqbmAbkOdCjne1ZQfg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795003979;
	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=o6NkUixIaGIxhWVtX5vLgTJsl5Rt9R4mlOjq/LvWRRU=;
	b=ONClvr/fBrthk9gk1jVfD1kTIZu2uoF2mEvXxGNPn8QjMHsECd4t6SLbFSsHcGD8OuaI
	 7d+PdkwyiL0BXIhdrapYOi3N5hqnw8WklBZ+EfAiAp3hJUxvBsoI5q0Nr1jptn0b/77Ds
	 u0k3yWaui+e721JEs3HHZ2cXeX5y4a3dSdiU+nc9Qx4IzN2u049HSC6QgxADv3vUQVNhA
	 KrmzPxljkH3sRkGnkZnfhN9f/zEUTKQly9HhAo1LPg3ALQIrRyx/FLwr/cUclh/KS3xLq
	 tAcRZRk2KWp2tqP9PEp8r3bji1jzmBxx55DwHXmGT55bExRcWjfYayzjnczQgY8kAuw==
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=DNYQIi4k;
	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 E9F39606A335;
	Wed, 18 Nov 2026 12:12:58 +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=DNYQIi4k
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=1795003978;
	b=CwW0beccP3c1BOvCXCCRLh49Z5isdkdNNfPe8s1yRZwdOVxldcxBrqxu0swwxY3ZGejA
	 HPh1PbYYAMC/h2tJoUo1bM6kH64woMmS1Jwa5uTJvS2qBT/njHD2Un31fx3aC+x98+UpU
	 JW3qWp3b/GPg53MMjUIg6IYtsn2KQSqCrQaf/1C+ugq8c2ZvXhmXToLjl2pUag2V4vbQC
	 WuhCt+sMOm+K7gQsRwWMpkp76hoi1U2KTSAd41E5Lk8AUeQb3U9JLxqUxk8sy/q+KIBHK
	 Xcf8OqFiGqSyCyBGAHpliJflGbqox92KrBiEjveCcOwXLq+X/6+RrdOMwd21CA6zPGg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795003978;
	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=o6NkUixIaGIxhWVtX5vLgTJsl5Rt9R4mlOjq/LvWRRU=;
	b=XrKX8KzgLJm/Dfv+/RYZKlKk6JK3QBvjBShPScG7cuE4wFT5nyFac7wuTyuuaPluEmay
	 pQNRSugQZK5t9S1b1VJcTD10KmwiYlBZYjQFx5SPu7o2PWcS+3kr/2v/MV2tRdwNSMfZ6
	 kmex0pdJJMPuTVScXVvY3nx6ex+iD1WPRYNg0hBEGI+ksbOxNL7+KsORIg5Zb3uKrzs2z
	 MxItS7WHdEX6lpYYmIaA8OdSrB3ZEhPgWos7VwPepO1nF3p8ygrjLLqKaKb40fxIDC5Uc
	 3buozoWNZWSvUc6Og6tbBWSLMHGMcLpbFdnl7IZtZId5t8RL22xtRgsOC9OsqKgxTQg==
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=DNYQIi4k;
	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 154F8606A31C
	for <netdev@vger.kernel.org>; Wed, 18 Nov 2026 12:12:58 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E65B81F000C6
	for <netdev@vger.kernel.org>; Wed, 18 Nov 2026 12:12:57 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795003977;
	bh=o6NkUixIaGIxhWVtX5vLgTJsl5Rt9R4mlOjq/LvWRRU=;
	h=References:In-Reply-To:From:Date:Subject:To:Cc;
	b=DNYQIi4kPqDgK3BJL8BQkHE1hN7kKYWgIOTohmEDmhhloQACdNKkJMT2PvJv0THGy
	 FRKQmh2n4s25WOPOiGELPIkhvpQNiA4oKMP3tFagKXe80bJRzDfkWzcLdjM3cjLO1C
	 X2vdo4t38OyzqqUxdwFqPXHu0vZ/5zVzIKp1VYjW7je8iVBi8/xuS24SP61LOaw3cV
	 BrndyT8YaRL/8cVpW08kHNblEvJW7gJZjRa6cJ2Fj7mHnzArZRgB4AdlNqrgTdY/gv
	 vtWpB+oE3XxyDV8tmutClLnvN50taKsj2Yk+l6pA+ZikN1Duv6nEo6cCKaqQAK1LnZ
	 a/pa9RgqHJkdg==
X-Received: by mail-oo1-f43.google.com with SMTP id 006d021491bc7-71ad1db7e31so1321258eaf.1
        for <netdev@vger.kernel.org>; Wed, 18 Nov 2026 04:12:57 -0800 (PST)
X-Forwarded-Encrypted: i=1; AL+hErGdeNgBSfjm4DBuffEsTF6KxqtWS0IiErRT8riMKcUFZeaSkDVjfa0k50Pdncl8EdAirbK8tFg=@vger.kernel.org
X-Gm-Message-State: APuU4Z/4B1ODjixmtn/i0K5C9AmPnV+XtK/k3AZ/nZ8UC6AsGFu5wuNm
	d7l1CppjhFWfi8zuqwMtEyk8+T1wrz5unAGUrILu6+TzRBg9KTKy8Wl5OK6Xskn0yuqmILK959v
	yfy6TF3W7riK30fbciNmhWNH9aor4jFc=
X-Received: by 2002:a05:6820:1907:b0:6d9:4131:5035 with SMTP id
 006d021491bc7-71b02944507mr3515423eaf.43.1795003977008; Wed, 18 Nov 2026
 04:12:57 -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: <179499954853.1440581.6627074959099619480@gmail.com>
X-Gmail-Original-Message-ID: <CAL4WiiouZZ46QRp5K6MYK=vevKXYLzd_p049qVVf=w+9L8d96Q@mail.gmail.com>
X-Gm-Features: AclHuK-hXcrZxctniMtIHyC9pOLLCSZJDsVh-XhX04k9Pj10EP6n6DQMf1hKW4o
X-Cc: Neal Cardwell <ncardwell@google.com>, Kuniyuki Iwashima <kuniyu@google.com>, 
	"David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, 
	Simon Horman <horms@kernel.org>, Cambda Zhu <cambda@linux.alibaba.com>, netdev@vger.kernel.org, 
	linux-kernel@vger.kernel.org