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 D6796279334; Mon, 13 Apr 2026 16:09:48 +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=1776096588; cv=none; b=tFyj2UEas7TqjaBEP7R+yvxm0kKS95ahhGWpX8m8ahcwNBqv8gMv6DlqcEdmWAmEiU/laEHfMz828Bpm+/z8F/CIBtjHGgFChNwRUUpcVmbtbNk/pxxPqpQXXRgQi1fvU1OnvtJM8ooYkY2SNx+7n1IaqM4UWajeUxi9Xiyz4nQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776096588; c=relaxed/simple; bh=ls3h21ocD29zUjWXAvTBTOpbQk6vEhxymtf2+OvQ0fc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f/t3lvrWi+RcaDMc+pjAqBKW2kDDFiWCZ/Cyfc3BkSk8sE8zLK0uObWy9ZFwv5OcZ8WPvQkqulRCDQ2BflW3ZDaPdmW01FEmfKMDQlqaqkG5fGR+H1CLPKeOto3JYWiak/wMR0S6HenlRqE6sbQY1PY75hz8iUcTp5F8+5alK1c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OjZ/sphu; 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="OjZ/sphu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C18EC2BCAF; Mon, 13 Apr 2026 16:09:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776096588; bh=ls3h21ocD29zUjWXAvTBTOpbQk6vEhxymtf2+OvQ0fc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OjZ/sphuO2VRmFpWs8GQWgnsCY8OGwjo5aCmlOWQV5PR5h5cJV8BSwp9twOPQu8N+ RwO9IPCHmA+HAyr0VFZ2uQj/zoSm9/eJKG45ePlv1b9x/Nvkc6bbZywKZoOXeuRDGl J6cDdj4fL3cvDTI+ZXURwMhBiq0t0dQunMzdq8TY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Anderson Nascimento , David Howells , Jeffrey Altman , Marc Dionne , Simon Horman , linux-afs@lists.infradead.org, stable@kernel.org, Jakub Kicinski Subject: [PATCH 6.18 69/83] rxrpc: Fix key reference count leak from call->key Date: Mon, 13 Apr 2026 18:00:37 +0200 Message-ID: <20260413155733.580833902@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413155731.019638460@linuxfoundation.org> References: <20260413155731.019638460@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.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Anderson Nascimento commit d666540d217e8d420544ebdfbadeedd623562733 upstream. When creating a client call in rxrpc_alloc_client_call(), the code obtains a reference to the key. This is never cleaned up and gets leaked when the call is destroyed. Fix this by freeing call->key in rxrpc_destroy_call(). Before the patch, it shows the key reference counter elevated: $ cat /proc/keys | grep afs@54321 1bffe9cd I--Q--i 8053480 4169w 3b010000 1000 1000 rxrpc afs@54321: ka $ After the patch, the invalidated key is removed when the code exits: $ cat /proc/keys | grep afs@54321 $ Fixes: f3441d4125fc ("rxrpc: Copy client call parameters into rxrpc_call earlier") Signed-off-by: Anderson Nascimento Co-developed-by: David Howells Signed-off-by: David Howells Reviewed-by: Jeffrey Altman cc: Marc Dionne cc: Simon Horman cc: linux-afs@lists.infradead.org cc: stable@kernel.org Link: https://patch.msgid.link/20260408121252.2249051-9-dhowells@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/rxrpc/call_object.c | 1 + 1 file changed, 1 insertion(+) --- a/net/rxrpc/call_object.c +++ b/net/rxrpc/call_object.c @@ -692,6 +692,7 @@ static void rxrpc_destroy_call(struct wo rxrpc_put_bundle(call->bundle, rxrpc_bundle_put_call); rxrpc_put_peer(call->peer, rxrpc_peer_put_call); rxrpc_put_local(call->local, rxrpc_local_put_call); + key_put(call->key); call_rcu(&call->rcu, rxrpc_rcu_free_call); }