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 1090F271464; Mon, 13 Apr 2026 16:07:04 +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=1776096424; cv=none; b=iXeWrbPh2pr735bOLqVrcMFf9QgphEez6uQAla11DBXo1SzqewyZscOmWJtDigA8eWzAFXPl300gXQtvAZRdIuUVOMnmlfzaaaQm7B5mMZO+0BvIoEDqJ4phi1kcdOzl5Zu4X2s+DwO6LnVZS+TL/N0xqiUaNfSi8+ieaPVYLcg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776096424; c=relaxed/simple; bh=pntr6K4PbNhWfzsw1hOLfngkYa/i1hk5RXXvvTQS284=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YaKctthRfTWp2RM1XC3JtvmEIidfqJksW15vVv41jZq9vV/xBXtjNLuWp9hIhvsh+qloI/W+/dfjukCLjtJV+b9ee8ZcNlzU1xgEYOUNuGlASC2Fm6kKGxOewUx/77jPyrP2OCqXNCiwJFFyFSJvZ/nwzi2bs+Lxs7LJEeBL7pg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yC33yI1p; 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="yC33yI1p" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AE18C2BCAF; Mon, 13 Apr 2026 16:07:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776096423; bh=pntr6K4PbNhWfzsw1hOLfngkYa/i1hk5RXXvvTQS284=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yC33yI1pqeM5+R3n4c09hON9zXjegRRCWD5AY/kt0uYsuEETQCuL4k9koNjpKenBo R2tlen9JKqnHUWCAWKRnQ0F+CLxQWe7aJS5LqPV9ZeC3taXtfMEJ0fG3cwyn1a5Ty4 CMU9VWccHbrjTPq4U7kdfwKzzOUM0cgVj2rK1oD0= 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.19 72/86] rxrpc: Fix key reference count leak from call->key Date: Mon, 13 Apr 2026 18:00:19 +0200 Message-ID: <20260413155734.234656245@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: 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); }