Article View: linux.kernel.netdev
Article #8477Re: [PATCH net] tcp: fix reordering addition overflow in MTU probing
From: Jiayuan Chen
Date: Thu, 29 Oct 2026 06:52
Date: Thu, 29 Oct 2026 06:52
33 lines
9657 bytes
9657 bytes
On 10/29/26 12:02 AM, Eric Dumazet wrote:
> From: Kyle Zeng <kylebot@openai.com>
>
> Commit efb8763d7bbb ("net: ipv4: bound TCP reordering sysctl writes and
> MTU probe sizes") widened size_needed and the MSS multiplication, but
> tp->reordering + 1 is still evaluated as u32. RTAX_REORDERING accepts
> an unrestricted u32, and tcp_init_metrics() can install U32_MAX.
>
> In that case the extra-data requirement becomes zero. A write queue
> with probe_size - 1 data bytes and a FIN satisfies the sequence-space
> check. The coalescing walk can pass the queue head to
> tcp_skb_can_collapse(), and tcp_clone_payload() can produce an skb
> whose advertised payload exceeds the data in its fragments. Local
> delivery followed by TCP_ZEROCOPY_RECEIVE can then walk beyond the
> fragment array. KASAN reports a slab-out-of-bounds read in
> can_map_frag().
>
> Cast reordering before incrementing it so the arithmetic handles the
> entire u32 metric range. For U32_MAX, the required size exceeds the
> 32-bit queue and window limits, so the existing checks skip the probe.
> The calculation is unchanged for all other reordering values.
>
> Fixes: efb8763d7bbb ("net: ipv4: bound TCP reordering sysctl writes and MTU probe sizes")
> Cc: stable@vger.kernel.org
> Cc: Wyatt Feng <bronzed_45_vested@icloud.com>
> Cc: Ren Wei <n05ec@lzu.edu.cn>
> Signed-off-by: Kyle Zeng <kylebot@openai.com>
> Signed-off-by: Eric Dumazet <edumazet@kernel.org>
Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Technical Details
Message-ID:
<5ae8a59a-93a1-4b51-85a6-17ccc07eda11@linux.dev>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353182-linux-kernel-netdev=dewy.ruReferences:
<20261028160226.2170244-1-edumazet@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-353182-linux-kernel-netdev=dewy.ru From: jiayuan.chen@linux.dev (Jiayuan Chen) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] tcp: fix reordering addition overflow in MTU probing Date: Thu, 29 Oct 2026 14:52:08 +0800 Organization: Usenet Network Message-ID: <5ae8a59a-93a1-4b51-85a6-17ccc07eda11@linux.dev> References: <20261028160226.2170244-1-edumazet@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="1952979"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:6eSbPqg/ct3Ykmp68+Tajl5iCAU= sha256:fh78bmHJi1nIGaNgkIXMEcFQZbSxahCgl8r/Q/u3Svw= sha1:mOU/aSP9oxmoNjaY5P7rQKIpmgo= sha256:+arVvE1dxxjwAGpMsLVhvSx4t/He6sQc0SzUg57hPGM= 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 DF65B125C5A; Thu, 29 Oct 2026 09:53:02 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.051 X-Spam-Status: No, score=-2.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HK_RANDOM_FROM=0.999, 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 (1024-bit key) header.d=linux.dev 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 C5Ao2r0SSyGN; Thu, 29 Oct 2026 09:52:59 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-353182-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 65899125C58; Thu, 29 Oct 2026 09:52:50 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 19EAE2394B; Thu, 29 Oct 2026 06:52:45 +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=1793256764; b=B9at1jurVodZhEAShR/wjkDiO9ZReKoSo7yxXHyKuu/W2loqJKt1IFS6jm8R3VWJRLlH aynS6W7lAfPIRyYFIS8SZGBx9LF9RMZrFhttC2bck0agExdsnIIQHGuDGzJ4cjjpurUwC X3RreWrrILWFgs8FpRolKtRViwF/BoiNaC8kk6DWMu3KfAnguuZTdnrNjo4QrByYljQJr hUoQY/tdAFRkDbR7SKL6+uKsZA0/ORLpglhtilmjkZGZSktuvl3l/fsDNbW7j75FRwpDq c8OGrw+cPxStTiRq5dITttb9yh9nA/9GIi6OhsiOANTVRuRA+QPuqGCGdBjbrCRXKSQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793256764; h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature: X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent: Subject:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=vcihILDAFgcDCuhSue5WNeTEF7sScUqqUKJXvqpr+l0=; b=b1JwsKBsayrlfbY9T/LWGj0Q/eswYxrMsxzqntskfORnYJt/1gijqMf+OIDJPOdVouIp 42bCl0y/lEDFuFc3rmfklQQme2iKDnCcLT3VqMYlYbD7zpmE9D6S18w3LJUGZZd29S4L4 4aool8oKPoVewoDurnR+xaSbPV7jnoYKowIgXrH1ZPYsM7dPXymkpYFodVoInRQkmzqSA 9wjHB0SBhrLV4k1cmcq7E//xvvO31DNeOal9rR1Y8FNQ1XUFBQq/yiFIH+j5Pt5E425yW MF+CCXMgvUOw0AoHeQSuPuAFayVKITWjqAk42yIJpShxyJ6tsSVHIjwDrEZfyD7w/3A== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=R19KnPYs; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; 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 BFDD7606A31E; Thu, 29 Oct 2026 06:52:44 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=R19KnPYs X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.30 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793256753; b=RZ8tWDnfvOv2SFKxVtBYxNqwpP3lDrr51waETEGkjyeh2yBvScKeGPwOalRPbn6FKTtz RsKZln5ajqLXoISJggYDunxyNxBvtbz26ZfXAZJLW9MFYD7AvAC7scidUKTB1QTDgTOHc pZNQtoatYJzZfOtjZkdlSKjJdpYx0I194pEkYO6X2aFW0mFlQg1So1uxR+2YcxpCyM5aO KvMdxf07EqJ30d9yyUQeA5AkfbS7TAJvarmQySORGOsW2RxVMYdJRc2xrFNxQgfPuCzPy jD7R4I2rMSebtXUeetAVZ8sAYDoz4ikjYbS0mKFK4nPSyLxdAOPri3ClRctmmR35InA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793256753; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=vcihILDAFgcDCuhSue5WNeTEF7sScUqqUKJXvqpr+l0=; b=ot8aqmnIliPtBAd9gyb2RRIkp0UJKOukQLzFjGc+OeXzXaNTA1G+l+LfeJaoZBDf138V ++yhBTUDP5oM6ZAxxFnLx/YxvuHAjniw40qs21LU5d+VvstAs7zhHdCUcpEiZowgePBZu y7Esy0bI2uJzA5tKW5QH1dXhqO1iRo0GM7Gdmr2vOtodzDeJtZ8uGgxqNtdQ3wI5LrLlV 4ZLbjhQzWY7wxwNTsh5AVG9G7GIZa6Y8mEnKoVqwj00FboX8jqZ5IWPgxJ1pTG5A1TahY TqKnCj/rFiowqT3DsMjNZE0HrDGMVaS9/rlu9mwYYzB1IjN0Xd4BwvgNArNfMlgeRaA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; arc=none smtp.remote-ip=95.215.58.30 X-Received: from mta1.migadu.com (out-30.mta1.migadu.com [95.215.58.30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4A5F606A31A for <netdev@vger.kernel.org>; Thu, 29 Oct 2026 06:52:21 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B4A5F606A31A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-DKIM-Signature: a=rsa-sha256; bh=vcihILDAFgcDCuhSue5WNeTEF7sScUqqUKJXvqpr+l0=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1793256739; v=1; x=1793861539; b=R19KnPYsPw8jj2qkg7t/SdlQ13ULp2eovF41diFFKQbTOE0Sp7/3EhRa8Ix1SFur98mfHZ+S /gKYr2BMudxHm1i8HJn9beb9g5MCrXC+hCvBksteMuoP/R/ESPs2zt1aHmgjbfRDQSNLKPZmF+M c/nL75x7cU2eP0ThiS0WZfLM= X-Envelope-To: netdev@vger.kernel.org X-Received: by smtp.migadu.com with ESMTPS id 63eb0333a2af5555; Thu, 29 Oct 2026 06:52:19 +0000 X-Mizu-Trace-ID: 63eb0333a2af5555 X-Migadu-Flow: FLOW_OUT 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-User-Agent: Mozilla Thunderbird X-Cc: Simon Horman <horms@kernel.org>, netdev@vger.kernel.org, Kyle Zeng <kylebot@openai.com>, stable@vger.kernel.org, Wyatt Feng <bronzed_45_vested@icloud.com>, Ren Wei <n05ec@lzu.edu.cn> X-In-Reply-To: <20261028160226.2170244-1-edumazet@kernel.org>