From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3048A277026; Mon, 13 Apr 2026 16:06:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776096411; cv=none; b=eKzkU6mkeCUlfsXvW2yWatiyQ8pmHtsaVEzFmEYe6XSReGInYKU19MfuwbJAvBwA4z2KbOWiJ42zOMikw8CWR/FENjUdyDLXl/8AT3MWzHr5RENwJKFRt1niZizGVvky3TtXFFWPoWHgBgnNrqCRwd9XHrVtAZ/E/hda0bLjXuM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776096411; c=relaxed/simple; bh=T8Ob2xH1iaJbooCf8AsTI1JIHLzA8oXiPS4K4XO7cso=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TCY/Xji2mcF4R713v+S0Vn2LWvOuXebgQMsyDD2vbkIn3d5Sw3yFHSdwOdUrrnOhGUrSTEJpcedBvO+EKv9iWJ5QlH6Ur+vNNXalg+SWvraD9LZfsbPTMwHv+F1Xk9nVvI5uUCxMJ8qxNZObozLyEDuqszWiXHfjgqhBPXCQ2Aw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jDSeOrGo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="jDSeOrGo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6CA2C2BCAF; Mon, 13 Apr 2026 16:06:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776096411; bh=T8Ob2xH1iaJbooCf8AsTI1JIHLzA8oXiPS4K4XO7cso=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jDSeOrGo0mdlrGn4+duTmwWIrgB6F3vUT1p5hJsh0AXawPH2UBKN4Na7mxxOX/EAB 5QfK9qPcMxQweVIQ9eqefA4C9jTQsP8v770DISmdBSw54yd2bZLvg1G3ugrVCvVJnq vYch7JkgUG1yCg1ftvxuNGdV12L79/HrT+Th34uw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, David Howells , Marc Dionne , Jeffrey Altman , Simon Horman , linux-afs@lists.infradead.org, stable@kernel.org, Jakub Kicinski Subject: [PATCH 6.19 67/86] rxrpc: Fix anonymous key handling Date: Mon, 13 Apr 2026 18:00:14 +0200 Message-ID: <20260413155734.054103070@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413155731.568515178@linuxfoundation.org> References: <20260413155731.568515178@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Howells commit 6a59d84b4fc2f27f7b40e348506cc686712e260b upstream. In rxrpc_new_client_call_for_sendmsg(), a key with no payload is meant to be substituted for a NULL key pointer, but the variable this is done with is subsequently not used. Fix this by using "key" rather than "rx->key" when filling in the connection parameters. Note that this only affects direct use of AF_RXRPC; the kAFS filesystem doesn't use sendmsg() directly and so bypasses the issue. Further, AF_RXRPC passes a NULL key in if no key is set, so using an anonymous key in that manner works. Since this hasn't been noticed to this point, it might be better just to remove the "key" variable and the code that sets it - and, arguably, rxrpc_init_client_call_security() would be a better place to handle it. Fixes: 19ffa01c9c45 ("rxrpc: Use structs to hold connection params and protocol info") Closes: https://sashiko.dev/#/patchset/20260319150150.4189381-1-dhowells%40redhat.com Signed-off-by: David Howells cc: Marc Dionne cc: Jeffrey Altman cc: Simon Horman cc: linux-afs@lists.infradead.org cc: stable@kernel.org Link: https://patch.msgid.link/20260408121252.2249051-4-dhowells@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/rxrpc/sendmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/rxrpc/sendmsg.c +++ b/net/rxrpc/sendmsg.c @@ -637,7 +637,7 @@ rxrpc_new_client_call_for_sendmsg(struct memset(&cp, 0, sizeof(cp)); cp.local = rx->local; cp.peer = peer; - cp.key = rx->key; + cp.key = key; cp.security_level = rx->min_sec_level; cp.exclusive = rx->exclusive | p->exclusive; cp.upgrade = p->upgrade;