From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) 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 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09FE61F0089F; Thu, 3 Dec 2026 18:14:50 +0000 (UTC) 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== Subject: Re: [PATCH net] rxrpc: Fix max_data reduction on an oversized ICMPv6 PTB From: netdev-bot+sashiko@kernel.org To: bugs@stellman-greene.com 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 Date: Thu, 03 Dec 2026 18:14:50 +0000 Message-ID: <179632169057.3146.9146296329897955249@kernel.org> In-Reply-To: <20261202181319.74045-1-bugs@stellman-greene.com> References: <20261202181319.74045-1-bugs@stellman-greene.com> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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 > > --- [ ... ] > 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