Article View: linux.kernel.netdev
Article #26546Re: [PATCH net] rxrpc: Fix max_data reduction on an oversized ICMPv6 PTB
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 18:14
Date: Thu, 03 Dec 2026 18:14
124 lines
12366 bytes
12366 bytes
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] rxrpc_adjust_mtu() in net/rxrpc/peer_event.c: when the ICMP
carries no MTU (mtu == 0), the function estimates one with `mtu =…
- [Low] The note that the bug was found with an AI-driven tool (Quality
Playbook running Claude) and that the fix was drafted with an AI…
--
rxrpc: Fix max_data reduction on an oversized ICMPv6 PTB
This patch changes the max_data calculation in rxrpc_adjust_mtu(). The
old code was max_t(int, mtu - peer->hdrsize, 500). The new code is an
explicit unsigned comparison against hdrsize followed by max(..., 500U).
With this, an oversized ICMPv6 Packet Too Big no longer floors max_data
to 500.
> Fixes: eeaedc5449d9 ("rxrpc: Implement path-MTU probing using padded PING ACKs (RFC8899)")
> Signed-off-by: Andrew Stellman <astellman@stellman-greene.com>
>
> ---
[ ... ]
> Found with Quality Playbook
> (https://github.com/andrewstellman/quality-playbook) running Claude
> Opus 5.5; the fix was drafted with OpenAI GPT-6 (Codex).
[Severity: Low]
This isn't a bug, but the tool disclosure is below the --- separator, so
git am drops it. The applied commit message ends at the Signed-off-by
line.
Documentation/process/generated-content.rst says:
if a tool was used to find a problem addressed by
a change, that should be noted in the changelog.
Could the note that the bug was found and the fix drafted with these
tools be moved into the commit message body?
> diff --git a/net/rxrpc/peer_event.c b/net/rxrpc/peer_event.c
> index 9d02448ac062c..5e9cd4adc478e 100644
> --- a/net/rxrpc/peer_event.c
> +++ b/net/rxrpc/peer_event.c
> @@ -122,7 +122,10 @@ static void rxrpc_adjust_mtu(struct rxrpc_peer *peer, unsigned int mtu)
> }
> }
>
> - max_data = max_t(int, mtu - peer->hdrsize, 500);
> + if (mtu <= peer->hdrsize)
> + max_data = 500;
> + else
> + max_data = max(mtu - peer->hdrsize, 500U);
> if (max_data < peer->max_data) {
[Severity: Medium]
Does this change lose the 500 floor when the estimated MTU wraps in the
mtu == 0 path? Earlier in rxrpc_adjust_mtu():
if (mtu == 0) {
/* they didn't give us a size, estimate one */
mtu = peer->if_mtu;
if (mtu > 1500) {
...
} else {
mtu -= 100;
if (mtu < peer->hdrsize)
mtu = peer->hdrsize + 4;
}
}
If peer->if_mtu is below 100, mtu -= 100 wraps to about 0xffffffxx. The
unsigned mtu < peer->hdrsize check can't catch that.
Before this patch, max_t(int, mtu - peer->hdrsize, 500) read the wrapped
difference as negative and gave 500.
With the new code, mtu <= peer->hdrsize is false, and
max(mtu - peer->hdrsize, 500U) gives roughly 0xffffff7e. That makes
max_data < peer->max_data false, so the reduction is skipped. So are
the pmtud_good/pmtud_bad clamps and trace_rxrpc_pmtud_reduce().
There are two ways if_mtu can end up below 100.
First, when peer->if_mtu == 65535, an ICMP FRAG_NEEDED or ICMPv6 PTB with
0 < mtu < 100 sets if_mtu to that value at the top of rxrpc_adjust_mtu().
If max_data was already 500 or less at that point (for example after an
ACK trailer advertised maxMTU 500), pmtud_good and pmtud_bad are not
clamped. rxrpc_input_probe_for_pmtud() can then raise max_data above 500
again.
Second, rxrpc_assess_MTU_size() does:
peer->if_mtu = dst_mtu(dst);
peer->hdrsize += dst->header_len + dst->trailer_len;
A small route MTU or xfrm overhead can leave if_mtu below hdrsize, with
max_data = RXRPC_JUMBO(1).
In either state, a later zero-MTU ICMP that reaches the function via
rxrpc_encap_err_rcv()->rxrpc_input_error()->rxrpc_adjust_mtu(peer, 0)
used to cut max_data to 500. Now it has no effect.
The commit message says "keep the 500 floor for MTUs at or below the
header size". Does that still hold when the estimate goes below zero?
Would guarding the subtraction keep the intended floor? Something like:
if (mtu < peer->hdrsize + 100)
mtu = peer->hdrsize + 4;
else
mtu -= 100;
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202181319.74045-1-bugs%40stellman-greene.com
Technical Details
Message-ID:
<179632169057.3146.9146296329897955249@kernel.org>Path:
mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!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-376816-linux-kernel-netdev=dewy.ruReferences:
<20261202181319.74045-1-bugs@stellman-greene.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!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-376816-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] rxrpc: Fix max_data reduction on an oversized ICMPv6 PTB Date: Thu, 03 Dec 2026 18:14:50 +0000 Organization: Usenet Network Message-ID: <179632169057.3146.9146296329897955249@kernel.org> References: <20261202181319.74045-1-bugs@stellman-greene.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2563009"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:iEIQ2v1aXWkbpAYHtyTMExZrF2Q= sha256:4eYj6cLxDQWU0CK/nFvMuvBMhG/jmhZSVBtFrhlB6Es= sha1:skdQeF1+8LYE6VBBrOZzUs24iCc= sha256:1spxuMe3KjGJAC6bBSq9/VT9E3n9RgEY9OoNFBJMUFI= 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 41D9B117A0A; Thu, 3 Dec 2026 21:15:13 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, 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 BnHao76Sv56Y; Thu, 3 Dec 2026 21:15:10 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376816-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id C7B821179F7; Thu, 3 Dec 2026 21:15:01 +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 603F8291EA; Thu, 3 Dec 2026 18:14:54 +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=1796321692; b=5W/8NR37hY9fR641yp2TUJia65eEkG7fTITH0VcmsBnW3L5H6/x+TG9V6hCXlrLrjzN0 Ar1UJZmjkFWhRfmzwS2QihYZuXH9/fWfQlOui1rqJAF1JVnUDCkwOCNtjpUsNYB/48SRx TyN8kv+2F37MpC+bPn3OVCA6W8m6HVwjhRnd5TSE5l8oMiSJVpa7ZQB0UH9fdGdL26BJ5 TKUeyjTd8ei8XtiP8zeiHyTKPYrc/L0l6mBfvgLIdd+sjjwxEhoTVhqvPDMpxdfDy7RED +aTAZLk9tjSuwKrOrwPWcEe1NXkKhqZ+E1yEdXfyyccJmqSxFTT4Szjucw5qK1Sc0Fg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796321692; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=H6r4vjtp2cdCAa2ihh/oCM1zMWtz5IME1j+BQlxT+1M=; b=ZUVXitYGeI5vUTbDJgqKU0MTcQnNF5louJqhLCT4ge/EijI8x60zUk2uq67JyDZWSfjv IRus5xTBIFHuVTreotJdnbt22vouD05TXF137TUKbGYISwvevhq5iOV8KTa5Ktqe7eErv j4lulBkoYzoU1nuOpmKmMU5/uG3RamcInffCygUjNyOS9Lu0dADbnPx6d4PeXZeNhY09k nAYWCYaAdFiJ1mDftsAurWrGtNojriVmhfV80JHlEneFzOqDwqPIqGbf/GKqa3DAKVMPr 24y9T64W+nTcfcMQFZyZCN6XLFcMifvV79D6W+wjalmB9dOkszAnMwNLYeyZDz8wbPA== 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=koBzAO+s; 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 B50B1606A335; Thu, 3 Dec 2026 18:14:52 +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=koBzAO+s 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=1796321691; b=PShEPz1GTEmdYfvBCabVabO91tYW2QWHQLDefwOynxt3h3ZcCw0owcTHAkyZHDA4zAK9 qK/TS9+URh81ATN4KtGH8x8AB1JQAzRsxqbXoW89FdHx9O5Aq3p1RfWj3l1Jh/AohbA1k 9kzA1AoH66+MDx3YyNXd4cpvltIvjPM/xvfHgHddzLfqqPQK+ZInm5H3sjfiTILqTTjDR PpKivLXW0P3eRyVeLUZzHqkqRooryDbIxHrrq1l+MhMr8r/BhmVvIGRyBzBWsolVm8QOt seRt4G3j22ttXgRBYKXha3JR22WtqU4AWtU+puILrACFVMYfikuO6MRLI520Ax1npWw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796321691; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=H6r4vjtp2cdCAa2ihh/oCM1zMWtz5IME1j+BQlxT+1M=; b=ShFthPd0K+cI915g9nDW/le4rMUtLUMlLj8IwOvqFSUryU9/hXuzII2VlBz4PWqJYO/Z XsRxHrP7veTPN5oXER4l/5kG6gDidsjh/BtEek/Pbrz/GsQflrAqbqpVeG4R13w5G6Jiu /B6JC2zPL/5X4m7ykianxQOl2grnDRVzA4OXDwrsToymTha5To7GzitI0OjncsMiEWZnM 2R6BJiGNElAV6oMq1lpPkip0woH89+BNB7Yho1QPICZBV2xe/i0lAH4nLtFZTJ9kODn10 1MIOwJZa08cIsGGURy6EiyhyMc5IIKARB6A7qNQ/yHvpSm2IPy+xa73lPwuByxOdVBw== 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=koBzAO+s; 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 D6896606A33B; Thu, 3 Dec 2026 18:14:51 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09FE61F0089F; Thu, 3 Dec 2026 18:14:50 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796321691; bh=H6r4vjtp2cdCAa2ihh/oCM1zMWtz5IME1j+BQlxT+1M=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=koBzAO+stc4eFpdEI5QlfTCCTRn512D13lYfVUKlEBjvl6KYLQ/Oo5Wi0MfrK+T4x l5E7NOc5n7a+zoFvv61bitVa0KJkQSIAnaIMhmaYBR2oqnliAQQQPQcdE27qJRgXwe EPjEWgxA9PsCsnaXaPgzTKDKcfVmrJg2H7jPASU1GPcHSwHX/x9I0zNISzhuQLYzjg 1qr3XJYrZGsNkHAJeqM19Lthavb74YuLw3ydFrUa1WjND3gwwGSyvZPQCg+xObCHyp ILBhfpigalf87e5SBmdSO7CN2foG2phuJ0bxnS2WbkJVlka+BoCpr+TUSf2dHboc1U TSorT0VhaYhKg== X-Cc: dhowells@redhat.com, marc.dionne@auristor.com, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, linux-afs@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-In-Reply-To: <20261202181319.74045-1-bugs@stellman-greene.com> X-sashiko-severity: Medium 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