๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #13268

Re: [PATCH net 2/2] wireguard: noise: recheck replay and flood under write lock on initiation

#13268
From: netdev-bot+sashiko
Date: Mon, 09 Nov 2026 15:20
44 lines
9616 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message names the response-side fix as `commit
  2a73c9b2c0ca ("wireguard: noise: reject response consumption afterโ€ฆ

--

wireguard: noise: recheck replay and flood under write lock on initiation

This commit makes wg_noise_handshake_consume_initiation() run the replay
and flood checks a second time after taking handshake->lock for writing.
Without the second check, two copies of the same initiation processed in
parallel could both get past the read-locked check. The read-locked check
stays as a fast path for rejecting replays.

> This is the initiation-side counterpart of the response-side race fixed
> by:
> commit 2a73c9b2c0ca ("wireguard: noise: reject response consumption after intermediate initiation")

[Severity: Low]
Is this the right hash for the referenced commit? 2a73c9b2c0ca doesn't
resolve here. git log reports it as an unknown revision.

The commit with this subject appears to be:

commit d0305f8d9002 ("wireguard: noise: reject response consumption after intermediate initiation")

Running git blame on the response-side recheck under down_write() in
wg_noise_handshake_consume_response() also points to d0305f8d9002:

    if (handshake->state != state ||
        crypto_memneq(handshake->ephemeral_private, ephemeral_private, NOISE_PUBLIC_KEY_LEN)) {

Could the reference be changed to d0305f8d9002? This patch is tagged for
stable, so readers who follow the cited hash to the related fix would
find the right commit.

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261105141006.95083-1-alex%40badcode.im
Technical Details
Message-ID: <179423765848.994134.12106914820524986319@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359390-linux-kernel-netdev=dewy.ru
References: <20261105141006.95083-3-alex@badcode.im>

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-359390-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 2/2] wireguard: noise: recheck replay and flood under
 write lock on initiation
Date: Mon, 09 Nov 2026 15:20:58 +0000
Organization: Usenet Network
Message-ID: <179423765848.994134.12106914820524986319@kernel.org>
References: <20261105141006.95083-3-alex@badcode.im>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="387304"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:4G2d3JZ5oID5GZjwpT8WaVo0Suw= sha256:dOaMSEFEz8168+6Akv7zVBD//80c/1CjlT/ChKAkxMg=
	sha1:BlJUIQx/FSo013H86MWkWOckCN8= sha256:N5eHPfYUpjN0Q10kxPjbcMc6moXEuklB/CHbmEdmy7I=
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 AD4E6113850; Mon,  9 Nov 2026 18:27:39 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.301
X-Spam-Status: No, score=-2.301 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, 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 u-XXlrAtaib7;
	Mon,  9 Nov 2026 18:27:36 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-359390-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 0639911383F; Mon,  9 Nov 2026 18:27:28 +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 A06BF1062CD; Mon,  9 Nov 2026 15:21: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=1794237666;
	b=1zej33W2apUdaGC0pFnJ6J2ujt3Re/W6DX17wbC+HDESHPuMYKnC+lVLEAsyK9WjpWS+
	 eWPSlfObU8HveKiDTaPG30Vos/H2DdzX+qEN5WX+B7AO1adRuGCAdxnczpSBdgycPafDk
	 R6R9aPpxjg3gyPCqkSHBUX+5OxiRywLRXn8wRaZCw6LyLNbTRGuyIpe6fHH1NZI+RIRpw
	 ovFvMlWTZt5p4Q9KEJ5sb5/sYbMmPph7QdGEDH2vdW201V/gqPackt1hbWYiJ5Bcv+P4i
	 OKSpt0GiKT4bd+9uqdc+aoE8yATuy10kun2JsivGochw/y42V25QY4vCWR0iFgKPCCA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794237666;
	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=ZEDcgpZXv7tELS5BnebtNXmUzNMs+qj+jNMbQJ/Z9P0=;
	b=cLxPArifr5LEDMZJKrqNigU3ioZUI96kURQNqUTKSu0DJaYJf00MCWHgW2+5mFF83nBr
	 DRfc/YH81ne26aV2vvP4zUUwbqbjdhXvU8Fhbz6ZnTyYweBIQExJ51xD0+toq0cLT/ngd
	 MmZFAqFTG78NKeWhGRy11DAgat0OJQbDl090DEABFiG1JokFE6xso8ZclJ4EsTvI1wWKy
	 cS8F7kKmCKf3OYu3LhAJ1baDIB1egXgofLn9PpJkAjgBLh2Dwv6kEVM/FX1wT+5MeEsBt
	 rRxqr6sU3U050r+fBsSP3yxsjRLOeg2eZb28DQ4nlX1lfaDNOpElRmMAU0rmeeXYXpg==
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=jZBBah3C;
	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 63A44606EE88;
	Mon,  9 Nov 2026 15:21:06 +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=jZBBah3C
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=1794237660;
	b=LitvM5sO7iCqWf7o+OKhB7QAT8b7OH5qU6PGbd7S3ZZ3+AhwSosDvB0BQhAWPs46p3w2
	 LzUDDCWKdNBPmXp6utYVyXK3xNf6cB26vFZq/+LNOrLOuSBRvKboeRStKI48OPLXRnu0/
	 zKJ3lKA7/m9E2lE1Qs4kE9QRcp/s0ErNcOHBAEwnm1TJwZADiBZ9YGpcMzrB3T/csPH9k
	 fLdKOxVbZ/9uBVT8WTGuSS6T5vu60CpA7aE1BFVR1+KjbkHhCnK/c0IJNo1TVYvZhrcof
	 9azNnKvb7MV2GjikKFXb8Oh4oVNVpaHVgNoDP8EbYks7n/GZ8NZQSA+F8cRLvbPzF8g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794237660;
	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=ZEDcgpZXv7tELS5BnebtNXmUzNMs+qj+jNMbQJ/Z9P0=;
	b=li0FaudPbXXmOFVdBRwxcce8Hw7+rKeKhf+fU58iw/SQ6m0tqCC0Xk3PR7YObLSBMwvb
	 IjEuWY6rGDeP9nF2ZDVi8sbRe+C9bOCwtbMtJDoYKqYZ2v8c6zdmNZOVAqQlfF2/kqkyV
	 eL4OSGbihjN/Dy1uRljhsCW4fRaywEbmzaYNW++l37SYI9RTB/elo2kl94sLtNyLNQsBo
	 sjQkrSskGkAADREsfNTsuOXICaXHb9rrHUp/mZ78B7DFwy9LoEakOXYj2NhdCCJiEqGUG
	 rYBPLdBkXCQ1Oca8Qch00d93pA40aDUS2wPKV6cKRGP4PjhLfjcCdgI61txstcSOPVA==
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=jZBBah3C;
	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 28880606A335;
	Mon,  9 Nov 2026 15:20:59 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E30061F008A1;
	Mon,  9 Nov 2026 15:20:58 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794237659;
	bh=ZEDcgpZXv7tELS5BnebtNXmUzNMs+qj+jNMbQJ/Z9P0=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=jZBBah3CEkuczstxqzX0W1hJaSHbQ6sNIED+xrfJzrJGbzEChuY2EKDdrLMgSbkx2
	 ylxbq0P2ml//UkOYXNdWLTf7OEKwJLrIIOBBsQzmEMKCK3SqADe5F4WZETLTb7zA8A
	 a47U9w+I1CUP434aQL5ZGT8Vpnc6yJmOdRqhXhE1Iq/NRtkx+EEHAd0RocqzRIYMTl
	 KbOIaHSefN+6vUoujGxCFTKjtpG13FR2TIMuVE/85q7B5ZW6Yfpg1Cxw75XRB4/YbZ
	 aSDJUlCg4uxrqcUu7EvPpseuAO5gOZeN0bVMBsX2ZeIaUMG0LsSovmxxkn3TATm6sj
	 lFUrBAIRsOSNw==
X-Cc: Jason@zx2c4.com, wireguard@lists.zx2c4.com, netdev@vger.kernel.org,
 andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
 kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org,
 stable@vger.kernel.org
X-In-Reply-To: <20261105141006.95083-3-alex@badcode.im>
X-sashiko-severity: Low
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